// Lean compiler output
// Module: Lean.Server.FileWorker
// Imports: public import Std.Sync.Channel public import Lean.Language.Lean public import Lean.Server.FileWorker.Utils public import Lean.Server.FileWorker.RequestHandling public import Lean.Server.FileWorker.WidgetRequests public import Lean.Server.FileWorker.SetupFile public import Lean.Server.Completion.ImportCompletion public import Lean.Server.CodeActions.UnknownIdentifier
#include <lean/lean.h>
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wunused-parameter"
#pragma clang diagnostic ignored "-Wunused-label"
#elif defined(__GNUC__) && !defined(__CLANG__)
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-label"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
#ifdef __cplusplus
extern "C" {
#endif
LEAN_EXPORT lean_object* l_Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Lsp_instFromJsonLeanFileProgressParams_fromJson(lean_object*);
static lean_object* l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__0;
lean_object* l_Lean_JsonNumber_fromNat(lean_object*);
lean_object* l_Lean_Server_FileWorker_RpcSession_new();
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_updateDocument(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleImportCompletionRequest___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode___closed__1;
static lean_object* l_Lean_Server_FileWorker_runRefreshTasks___closed__0;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Server_handleOnDidChange___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_mainLoop_spec__2(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_FileMap_lspRangeToUtf8Range(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_setupImports___lam__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*);
lean_object* l_ImportCompletion_collectAvailableImports();
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics_spec__0___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_handleRpcConnect_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__3(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__3;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__1;
static lean_object* l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__0;
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__31;
lean_object* lean_io_cancel(lean_object*);
lean_object* l_Lean_Server_FileWorker_setupFile(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Json_compress(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__2;
lean_object* l_Std_Channel_forAsync___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__48;
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_modifyPartialHandler_spec__0___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__2(lean_object*, size_t, size_t, lean_object*);
lean_object* l_Lean_Lsp_instFromJsonRpcKeepAliveParams_fromJson(lean_object*);
static lean_object* l_Lean_Server_FileWorker_initFn___closed__4_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
static lean_object* l_Lean_Server_FileWorker_setupImports___closed__3;
static lean_object* l_Lean_Server_FileWorker_setupImports___lam__0___closed__4;
static lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__7;
lean_object* lean_mk_empty_array_with_capacity(lean_object*);
static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__4;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initializeWorker_spec__1(lean_object*, size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleResponse(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_setupImports___closed__2;
static lean_object* l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__1;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRequest___lam__0(lean_object*);
lean_object* l_Lean_JsonNumber_toString(lean_object*);
LEAN_EXPORT lean_object* l_Option_toJson___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__0(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_server_reportDelayMs;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__10;
LEAN_EXPORT lean_object* l_Lean_Option_get___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_spec__0(lean_object*, lean_object*);
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initAndRunWorker_writeErrorDiag___closed__0;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__28;
static lean_object* l_Lean_Server_FileWorker_setupImports___closed__10;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcConnect___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__9;
lean_object* l_Lean_Language_SnapshotTask_get___redArg(lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__2;
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderSetupInfoNotification___closed__0;
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse___lam__0___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__4___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6___boxed(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__3;
LEAN_EXPORT lean_object* l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0_spec__0___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Json_mkObj(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_();
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg___lam__0(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handlePostRequestSpecialCases___closed__0;
uint8_t lean_io_check_canceled();
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleResponse___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__5;
static lean_object* l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__2;
static lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__0;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__56;
static lean_object* l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__6;
lean_object* l_Lean_Server_SerializedLspResponse_toSerializedMessage(lean_object*, lean_object*);
uint8_t l_Array_isEmpty___redArg(lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__57;
lean_object* lean_io_promise_new();
uint8_t l_IO_CancelToken_isSet(lean_object*);
uint8_t l_Lean_Server_ServerTask_hasFinished___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendServerRequest(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_setupImports___closed__12;
static lean_object* l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__5;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcRelease___redArg(lean_object*, lean_object*);
lean_object* l_Lean_Lsp_instFromJsonInitializationOptions_fromJson(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__6___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest_spec__1(lean_object*, lean_object*, size_t, size_t, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__4;
lean_object* l_Lean_Widget_InteractiveDiagnostic_toDiagnostic(lean_object*);
static lean_object* l_Lean_Server_FileWorker_setupImports___closed__13;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__1;
static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__15;
static lean_object* l_Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2___closed__0;
static lean_object* l_Lean_Server_FileWorker_setupImports___closed__0;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_instImpl_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_;
lean_object* l_Lean_Name_toString(lean_object*, uint8_t);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_setupImports___lam__1___boxed(lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_JsonRpc_instOrdRequestID_ord(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_setupImports___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__1___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14_spec__14(size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_1535841126____hygCtx___hyg_2_();
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_mainLoop___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Array_qpartition___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__5___boxed(lean_object*, lean_object*);
static lean_object* l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__3;
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6___redArg(lean_object*);
lean_object* lean_array_push(lean_object*, lean_object*);
lean_object* l_Lean_Server_mkFileProgressNotification(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__7;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics_spec__0(size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_OutputMessage_ofLspResponse(lean_object*, lean_object*);
lean_object* l_Lean_Lsp_DiagnosticWith_fullRange___redArg(lean_object*);
static lean_object* l_Lean_Server_FileWorker_initFn___closed__0_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
LEAN_EXPORT lean_object* l_IO_ofExcept___at___00Lean_Server_FileWorker_handleImportCompletionRequest_spec__0___redArg(lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__36;
static lean_object* l_Lean_Server_FileWorker_initFn___closed__3_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
LEAN_EXPORT lean_object* l_Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_setupImports_spec__2(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initAndRunWorker_spec__14___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Server_FileWorker_importAllUnknownIdentifiersProvider;
uint8_t lean_uint64_dec_lt(uint64_t, uint64_t);
lean_object* l_Lean_Language_instInhabitedSnapshotTask_default___redArg(lean_object*);
uint8_t lean_usize_dec_eq(size_t, size_t);
lean_object* l_Lean_KVMap_find(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_setupImports___lam__1(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_updateDocument___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Server_rpcReleaseRef(size_t, lean_object*);
LEAN_EXPORT lean_object* l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_readDoc___at___00Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest_spec__0___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleNotification(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcRelease___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2_spec__2(lean_object*, size_t, size_t, lean_object*);
lean_object* l_Lean_Server_ServerTask_IO_mapTaskCheap___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_updatePendingRequests___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_fromJson_x3f___at___00Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__6_spec__6_spec__6___boxed(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__51;
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__0___redArg(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__17;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0___redArg___boxed(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__3;
LEAN_EXPORT lean_object* l_Array_toJson___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__2(lean_object*);
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoFinalNotification___closed__0;
static lean_object* l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default___closed__0;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__43;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__15;
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished_spec__1(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*);
lean_object* l_Lean_Lsp_instFromJsonLeanDidOpenTextDocumentParams_fromJson(lean_object*);
static lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__4;
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_1535841126____hygCtx___hyg_2____boxed(lean_object*);
static lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__6;
lean_object* l_Lean_Server_RequestM_mapRequestTaskCostly___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleCancelRequest___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_mainLoop_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Language_Lean_pushOpt___redArg(lean_object*, lean_object*);
lean_object* lean_array_fget_borrowed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_handleRpcConnect_spec__0(lean_object*, uint64_t, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Option_setIfNotSet___at___00Lean_Server_FileWorker_setupImports_spec__0(lean_object*, lean_object*, uint8_t);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__11;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Server_ServerTask_mapCheap___redArg(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_emitRequestResponse___redArg___closed__1;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__8;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__30;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initializeWorker___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_panic___at___00Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0_spec__0___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderInfoNotification___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Server_FileWorker_waitUnknownIdentifierRanges(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__53;
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleResponse___redArg(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__8;
lean_object* l_Lean_Name_mkStr5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished_spec__0(lean_object*, size_t, size_t, lean_object*);
static lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__0;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__0(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__1;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendUntypedServerRequest(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__6;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__2(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_runRefreshTasks___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleStaleDependency___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0___redArg___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_IO_Promise_result_x21___redArg(lean_object*);
LEAN_EXPORT lean_object* l_IO_ofExcept___at___00Lean_Server_FileWorker_handleImportCompletionRequest_spec__0___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_updatePendingRequests___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePostRequestSpecialCases(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Option_register___at___00Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4__spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t lean_string_dec_eq(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleResponseError___redArg(lean_object*, uint8_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_io_force_exit(uint8_t);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_workerMain(lean_object*);
lean_object* l_Lean_Lsp_instToJsonLeanIleanInfoParams_toJson(lean_object*);
lean_object* l_Lean_Server_FileWorker_handleUnknownIdentifierCodeAction(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_setupImports___lam__0___closed__2;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_emitRequestResponse___redArg___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__3;
static lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__5;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initAndRunWorker___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_updatePendingRequests___redArg___boxed(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__39;
lean_object* l_IO_lazyPure___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Option_fromJson_x3f___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0_spec__0(lean_object*);
static lean_object* l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default___closed__1;
static lean_object* l_Option_fromJson_x3f___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0_spec__0___closed__0;
lean_object* lean_string_utf8_byte_size(lean_object*);
static lean_object* l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__3;
static lean_object* l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__2;
lean_object* l_Lean_Server_RequestM_checkCancelled(lean_object*);
LEAN_EXPORT lean_object* l_IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0(lean_object*, lean_object*);
static lean_object* l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__2;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendUntypedServerRequest___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___redArg(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Server_RequestCancellationToken_cancelByEdit(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12(lean_object*, lean_object*);
lean_object* l_Lean_Server_mkPublishDiagnosticsNotification(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__0;
LEAN_EXPORT lean_object* l_Array_contains___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__4___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse___lam__0(uint8_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_mainLoop(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoNotification___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_instImpl___closed__0_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_;
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__2___redArg(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Lsp_instFromJsonLeanIleanInfoParams_fromJson(lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_initFn___closed__6_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__1;
lean_object* l_String_crlfToLf(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__5(lean_object*, lean_object*, size_t, size_t, lean_object*);
lean_object* lean_get_stdout();
static lean_object* l_Lean_Server_FileWorker_setupImports___closed__5;
lean_object* l_Lean_Server_FileWorker_waitAllUnknownIdentifierMessageRanges(lean_object*);
static lean_object* l_Lean_Server_FileWorker_initFn___closed__1_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__17(size_t, size_t, lean_object*, lean_object*);
lean_object* l_Prod_map___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14_spec__14___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleNotification___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Server_partialLspRequestHandlerMethods();
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcKeepAlive(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Language_SnapshotTask_finished___redArg(lean_object*, lean_object*);
lean_object* l_Lean_Json_getStr_x3f(lean_object*);
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__1___closed__0;
static lean_object* l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0_spec__0___closed__0;
lean_object* l_Lean_Lsp_instFromJsonRpcCallParams_fromJson(lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_handleDidChange_spec__0___redArg(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Name_mkStr3(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Server_FileWorker_handleStaleDependency_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Server_findModuleRefs(lean_object*, lean_object*, uint8_t, uint8_t);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleDidChange___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__6;
lean_object* l_Lean_Lsp_instToJsonLeanFileProgressParams_toJson(lean_object*);
lean_object* l_Std_CloseableChannel_new___redArg(lean_object*);
lean_object* lean_io_promise_resolve(lean_object*, lean_object*);
static lean_object* l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__4;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_modifyPartialHandler(lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___closed__0;
LEAN_EXPORT lean_object* l_IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12___boxed(lean_object*, lean_object*, lean_object*);
size_t lean_usize_of_nat(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleCancelRequest(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_initAndRunWorker___closed__2;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRequest(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__1___boxed(lean_object*, lean_object*);
static lean_object* l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__0;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t lean_string_dec_lt(lean_object*, lean_object*);
lean_object* l_IO_CancelToken_new();
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initializeWorker(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Lsp_instToJsonLeanImportClosureParams_toJson(lean_object*);
lean_object* lean_io_mono_ms_now();
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_task_pure(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___redArg___lam__0(lean_object*, lean_object*);
static lean_object* l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__3;
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleCancelRequest___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleImportCompletionRequest___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__0___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoFinalNotification___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_mainLoop_spec__0___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initializeWorker___lam__0(lean_object*, lean_object*);
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1___closed__0;
static lean_object* l_Lean_Server_FileWorker_parseParams___redArg___closed__1;
lean_object* l_Lean_JsonNumber_fromInt(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2___redArg(lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__0(lean_object*);
lean_object* lean_st_ref_take(lean_object*);
static lean_object* l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__0;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0___redArg___lam__0(lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__21;
static lean_object* l_Lean_Server_FileWorker_setupImports___closed__8;
LEAN_EXPORT lean_object* l_Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__2(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_runRefreshTasks_sleepWithCancellation_spec__0(lean_object*, uint32_t, lean_object*);
lean_object* l_Lean_Server_ServerTask_IO_mapTaskCostly___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_IO_ofExcept___at___00Lean_Server_FileWorker_handleImportCompletionRequest_spec__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__1(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg___lam__0___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initAndRunWorker_writeErrorDiag___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__5;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleStaleDependency(lean_object*, lean_object*, lean_object*);
lean_object* l_Std_Channel_Sync_send___redArg(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__45;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__52;
lean_object* l_Lean_Server_documentUriFromModule_x3f(lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Server_collectImports(lean_object*);
lean_object* lean_nat_to_int(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleImportCompletionRequest___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_emitRequestResponse___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
uint32_t lean_uint32_of_nat(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleResponseError(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_queueRequest___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initAndRunWorker_writeErrorDiag(lean_object*, lean_object*, lean_object*);
lean_object* l_Array_empty(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0___redArg___lam__0(lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_getImportClosure_x3f(lean_object*);
lean_object* l_Lean_Language_mkIncrementalProcessor___redArg(lean_object*);
lean_object* l_IO_FS_Stream_readLspMessage(lean_object*);
LEAN_EXPORT uint8_t l_Array_contains___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__4(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoUpdateNotification(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__1___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__4(lean_object*, lean_object*);
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkImportClosureNotification___closed__0;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_updatePendingRequests(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleResponseError___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__0;
lean_object* l_Lean_Json_getObjValD(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg(lean_object*);
uint8_t l_ImportCompletion_isImportCompletionRequest(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases___closed__0;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcKeepAlive___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_runRefreshTasks_sleepWithCancellation(uint32_t);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__0;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0(lean_object*, lean_object*, lean_object*);
uint8_t lean_strict_or(uint8_t, uint8_t);
static lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__2;
lean_object* l_Lean_Server_FileWorker_RpcSession_keptAlive(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__1___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_handleRpcConnect_spec__0___redArg(uint64_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_mainLoop_spec__0(lean_object*, uint64_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse(lean_object*, lean_object*, lean_object*);
lean_object* lean_io_wait_any(lean_object*);
lean_object* l_Lean_Lsp_instToJsonLeanILeanHeaderInfoParams_toJson(lean_object*);
static lean_object* l_IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12___closed__0;
lean_object* l_Lean_Server_instFromJsonCodeActionResolveData_fromJson(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0___boxed(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_setupImports___lam__0___closed__3;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Array_contains___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__4_spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initAndRunWorker_spec__14___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_IO_CancelToken_set(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Server_mkFileProgressAtPosNotification(lean_object*, lean_object*, uint8_t);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__33;
static lean_object* l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__1;
extern lean_object* l_Lean_Elab_async;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4____boxed(lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__3(uint32_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Lsp_instToJsonCompletionList_toJson(lean_object*);
lean_object* l_IO_sleep(uint32_t);
lean_object* lean_st_ref_get(lean_object*);
lean_object* l_Lean_Lsp_instFromJsonCancelParams_fromJson(lean_object*);
lean_object* l_Lean_LeanOptions_toOptions(lean_object*);
lean_object* lean_array_pop(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_fromJson_x3f___at___00Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__6_spec__6_spec__6(size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel(lean_object*, lean_object*);
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default___closed__1;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__5;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__58;
static lean_object* l_Lean_Server_FileWorker_initializeWorker___closed__1;
lean_object* lean_st_mk_ref(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_toStructured_x3f___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__2(lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__34;
lean_object* lean_array_to_list(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleImportCompletionRequest(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__9;
static lean_object* l_Lean_Server_FileWorker_mainLoop___closed__1;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__0___redArg(lean_object*);
static lean_object* l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__2;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8_spec__8___redArg(lean_object*, size_t, size_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_FileMap_utf8PosToLspPos(lean_object*, lean_object*);
lean_object* l_Lean_Server_DocumentMeta_mkInputContext(lean_object*);
LEAN_EXPORT lean_object* l_Array_fromJson_x3f___at___00Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__6_spec__6(lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__50;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendServerRequest___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Server_RequestM_asTask___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___boxed(lean_object*, lean_object*, lean_object*);
lean_object* lean_get_stdin();
lean_object* l_Lean_Lsp_instFromJsonCompletionParams_fromJson(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0_spec__0(size_t, size_t, lean_object*);
static lean_object* l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__4;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_instInhabitedOutputMessage_default;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks_spec__1(uint8_t, lean_object*, size_t, size_t, lean_object*);
static lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___redArg___closed__0;
lean_object* lean_get_stderr();
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__32;
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_handleRpcConnect_spec__0___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__1(lean_object*, lean_object*);
lean_object* lean_mk_io_user_error(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8_spec__8(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*);
lean_object* l_Std_DTreeMap_Internal_Impl_minView___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0___redArg(lean_object*);
lean_object* l_Lean_Language_diagnosticsOfHeaderError(lean_object*, lean_object*);
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderInfoNotification___closed__0;
lean_object* l_Lean_Lsp_instFromJsonRpcConnectParams_fromJson(lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderSetupInfoNotification(lean_object*, uint8_t);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler___redArg(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Lsp_instFromJsonRpcReleaseParams_fromJson(lean_object*);
uint8_t lean_name_eq(lean_object*, lean_object*);
lean_object* l_Lean_Elab_HeaderSyntax_toModuleHeader(lean_object*);
static lean_object* l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__3;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16(size_t, size_t, lean_object*, lean_object*);
uint8_t l_Lean_MessageLog_hasUnreported(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_runRefreshTasks(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_handleRpcRelease_spec__0___redArg(lean_object*, uint64_t);
lean_object* l_Lean_Server_RequestCancellationToken_cancelByCancelRequest(lean_object*);
lean_object* l_Lean_Server_RequestError_toLspResponseError(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcRelease(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Option_set___at___00Lean_Option_setIfNotSet___at___00Lean_Server_FileWorker_setupImports_spec__0_spec__0___boxed(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_sendServerRequest___redArg___closed__0;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_updateRequestsInFlight(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_queueRequest___redArg___lam__0(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__6;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__0(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcConnect___redArg(lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Widget_instRpcEncodableMsgEmbed_enc_00___x40_Lean_Widget_InteractiveDiagnostic_1765450820____hygCtx___hyg_1_(lean_object*, lean_object*);
extern lean_object* l_Lean_Server_RequestError_rpcNeedsReconnect;
extern lean_object* l_Lean_Language_instInhabitedSnapshot_default;
static lean_object* l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__1;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__1___boxed(lean_object*);
static lean_object* l_Lean_Server_FileWorker_initFn___closed__7_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
LEAN_EXPORT lean_object* l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10(lean_object*);
lean_object* l_Lean_Lsp_instFromJsonCodeAction_fromJson(lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__46;
lean_object* l_Lean_Lsp_instFromJsonDidChangeTextDocumentParams_fromJson(lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__49;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Option_set___at___00Lean_Option_setIfNotSet___at___00Lean_Server_FileWorker_setupImports_spec__0_spec__0(lean_object*, lean_object*, uint8_t);
lean_object* lean_get_set_stderr(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg___lam__1___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleDidChange(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_initAndRunWorker___closed__3;
LEAN_EXPORT lean_object* l_Lean_Option_setIfNotSet___at___00Lean_Server_FileWorker_setupImports_spec__0___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__4___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__4___redArg(lean_object*);
extern lean_object* l_Lean_Language_Snapshot_Diagnostics_empty;
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoFinalNotification(lean_object*, lean_object*);
lean_object* l_Lean_Server_FileWorker_EditableDocumentCore___private__1(lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Syntax_Range_toLspRange(lean_object*, lean_object*);
lean_object* l_List_appendTR___redArg(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_mainLoop___closed__0;
lean_object* l_Lean_Widget_instToJsonRpcEncodablePacket_toJson_00___x40_Lean_Widget_InteractiveDiagnostic_3833933514____hygCtx___hyg_123_(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__0(lean_object*, size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Server_FileWorker_handleStaleDependency_spec__0(lean_object*, lean_object*, size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_emitRequestResponse(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__12;
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__2(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__14;
static lean_object* l_Lean_Server_FileWorker_setupImports___closed__9;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_updateRequestsInFlight___lam__0(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__4;
lean_object* lean_register_option(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6_spec__6(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_handleRpcRelease_spec__1(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__2___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__2(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_setupImports_spec__3(lean_object*);
lean_object* l_Lean_Server_ModuleRefs_toLspModuleRefs(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__2_spec__2___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_emitRequestResponse___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_emitRequestResponse___redArg___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Server_FileWorker_initializeWorker_spec__0(lean_object*, lean_object*, size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__0(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__24;
lean_object* l_Lean_Json_Structured_toJson(lean_object*);
uint8_t l_Lean_Server_RequestCancellationToken_wasCancelledByCancelRequest(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_setupImports(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState;
static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__14;
static lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__5;
static lean_object* l_Lean_Server_FileWorker_initAndRunWorker___closed__1;
LEAN_EXPORT lean_object* l_Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14(lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__47;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_IO_FS_Stream_readMessage(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__3___boxed(lean_object*, lean_object*);
lean_object* l_String_toFileMap(lean_object*);
LEAN_EXPORT lean_object* l_Nat_cast___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel_spec__0(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__4(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__11;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__40;
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_mainLoop_spec__0___redArg(uint64_t, lean_object*);
LEAN_EXPORT lean_object* l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_initializeWorker___closed__0;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleStaleDependency___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8_spec__8___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10_spec__10_spec__10(size_t, size_t, lean_object*);
lean_object* l_IO_FS_Stream_writeLspMessage(lean_object*, lean_object*);
lean_object* l_Lean_Lsp_instToJsonPublishDiagnosticsParams_toJson(lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_mainLoop_spec__2___redArg___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Lsp_instToJsonRpcConnected_toJson(uint64_t);
uint32_t lean_uint32_sub(uint32_t, uint32_t);
LEAN_EXPORT lean_object* l_Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Lsp_instFromJsonClientCapabilities_fromJson(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_initializeWorker_spec__4(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Server_ServerTask_IO_asTask___redArg(lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__13;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks_spec__0(size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_handleRpcRelease_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___closed__0;
static lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg___closed__0;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__12;
LEAN_EXPORT lean_object* l_Array_toJson___at___00Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10_spec__10(lean_object*);
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__2;
static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__13;
static lean_object* l_Lean_Server_FileWorker_setupImports___closed__7;
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics___boxed(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__55;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3_spec__3(lean_object*, size_t, size_t, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__0;
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoNotification(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_updateRequestsInFlight___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_queueRequest(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_toStructured_x3f___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics_spec__1(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks_spec__0___boxed(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__3;
lean_object* l_Lean_Server_FileWorker_RpcSession_hasExpired(lean_object*);
static lean_object* l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__4;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleImportCompletionRequest___lam__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__16;
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__0(lean_object*);
static lean_object* l_Lean_Server_FileWorker_initFn___closed__5_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_runRefreshTasks_sleepWithCancellation_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse(lean_object*, lean_object*, lean_object*, uint8_t);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendServerRequest___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Name_mkStr2(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__37;
static lean_object* l_Lean_Server_FileWorker_parseParams___redArg___closed__0;
lean_object* l_Lean_Language_Lean_instToSnapshotTreeCommandParsedSnapshot_go(lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_handleDidChange_spec__0___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Environment_allImportedModuleNames(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__0;
lean_object* l_Lean_Lsp_instToJsonLeanILeanHeaderSetupInfoParams_toJson(lean_object*);
static lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__1;
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_mainLoop_spec__2___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6___redArg___lam__0___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6___redArg(lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___closed__1;
static lean_object* l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__2;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__19;
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__0___closed__0;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__1(size_t, size_t, lean_object*);
static lean_object* l_Lean_Server_FileWorker_setupImports___lam__0___closed__1;
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderInfoNotification(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleStaleDependency___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__29;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2_spec__2(lean_object*);
static lean_object* l_Lean_Server_FileWorker_setupImports___closed__6;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initializeWorker___lam__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases___closed__1;
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default___closed__0;
static lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__8;
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_handleRpcRelease_spec__0___boxed(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__7;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initAndRunWorker_spec__14(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*);
uint8_t lean_io_get_task_state(lean_object*);
lean_object* l_Lean_Server_FileWorker_importAllUnknownIdentifiersCodeAction(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_handleRpcRelease_spec__0___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePostRequestSpecialCases___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__42;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initializeWorker___lam__1(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg___lam__1(lean_object*, uint8_t, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initAndRunWorker_spec__14___redArg(lean_object*, lean_object*, size_t, size_t, lean_object*);
lean_object* l_Lean_Server_ServerTask_BaseIO_asTask___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_queueRequest___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_queueRequest___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__2_spec__2(size_t, size_t, lean_object*);
lean_object* lean_panic_fn(lean_object*, lean_object*);
lean_object* l_Lean_Json_toStructured_x3f___redArg(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__59;
lean_object* l_Lean_Server_foldDocumentChanges(lean_object*, lean_object*);
uint8_t lean_int_dec_lt(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendServerRequest___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Server_RequestM_runInIO___redArg(lean_object*, lean_object*);
lean_object* lean_nat_sub(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcConnect(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__5(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Array_append___redArg(lean_object*, lean_object*);
lean_object* l_Lean_Lsp_instFromJsonPublishDiagnosticsParams_fromJson(lean_object*);
lean_object* l___private_Init_Dynamic_0__Dynamic_get_x3fImpl___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Option_toJson___at___00Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__2_spec__2(lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderSetupInfoNotification___boxed(lean_object*, lean_object*);
lean_object* lean_nat_mul(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__1___redArg___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Server_RequestCancellationToken_new();
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0___redArg___lam__0___boxed(lean_object*);
lean_object* l_Lean_KVMap_insert(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__1(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_workerMain___boxed(lean_object*, lean_object*);
lean_object* l_Std_DTreeMap_Internal_Impl_maxView___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Json_getNat_x3f(lean_object*);
static lean_object* l_IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0___closed__0;
LEAN_EXPORT lean_object* l_Lean_Option_register___at___00Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4__spec__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__10;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__26;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcConnect___redArg___boxed(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_setupImports___lam__0___closed__0;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_emitRequestResponse___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_emitRequestResponse___redArg___closed__0;
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_JsonRpc_instOrdRequestID_ord___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__4___redArg___boxed(lean_object*, lean_object*);
lean_object* l_Std_DTreeMap_Internal_Impl_insert___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0___redArg___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Json_Structured_fromJson_x3f(lean_object*);
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoUpdateNotification___closed__0;
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__3___closed__0;
LEAN_EXPORT lean_object* l_Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Lsp_instToJsonRange_toJson(lean_object*);
static lean_object* l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__0;
uint8_t lean_uint64_dec_eq(uint64_t, uint64_t);
static lean_object* l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__2;
LEAN_EXPORT uint8_t l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6___redArg___lam__0(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__19___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_instImpl___closed__1_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_;
static lean_object* l_Lean_Server_FileWorker_setupImports___closed__4;
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__1___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_modifyPartialHandler_spec__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_modifyPartialHandler___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Option_get___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_spec__0___boxed(lean_object*, lean_object*);
lean_object* l_Std_Channel_send___redArg(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__23;
size_t lean_usize_add(size_t, size_t);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleResponseError___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t lean_uint32_dec_lt(uint32_t, uint32_t);
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1___closed__1;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__27;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__35;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_instTypeNameMemorizedInteractiveDiagnostics;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initializeWorker_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__1;
lean_object* lean_array_uget(lean_object*, size_t);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0(lean_object*, lean_object*, lean_object*);
size_t lean_array_size(lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__1(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__13(size_t, size_t, lean_object*, lean_object*);
lean_object* l_Lean_Language_SnapshotTask_map___redArg(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t);
lean_object* l_Lean_KVMap_mergeBy(lean_object*, lean_object*, lean_object*);
lean_object* l_IO_FS_Stream_withPrefix(lean_object*, lean_object*);
lean_object* lean_int_add(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Lsp_instToJsonCodeAction_toJson(lean_object*);
lean_object* lean_io_error_to_string(lean_object*);
static lean_object* l_Lean_Server_FileWorker_setupImports___closed__11;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcRelease___redArg___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Language_Lean_process___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2(lean_object*, lean_object*, lean_object*);
lean_object* lean_st_ref_set(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_instInhabitedOutputMessage;
lean_object* l_Lean_Lsp_instFromJsonWorkspaceFolder_fromJson(lean_object*);
lean_object* l_Lean_Name_mkStr4(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_IO_FS_Stream_writeSerializedLspMessage(lean_object*, lean_object*);
lean_object* l_IO_throwServerError___redArg(lean_object*);
lean_object* l_IO_FS_Stream_putStrLn(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_toStructured_x3f___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__0(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_readDoc___at___00Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest_spec__0(lean_object*);
static lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__2;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__41;
static lean_object* l_Lean_Server_FileWorker_initAndRunWorker___closed__0;
LEAN_EXPORT lean_object* l_Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleCancelRequest___redArg(lean_object*, lean_object*);
lean_object* lean_string_append(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleImportCompletionRequest___lam__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Array_contains___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__4_spec__4(lean_object*, lean_object*, size_t, size_t);
lean_object* lean_io_wait(lean_object*);
lean_object* l_Lean_Lsp_instFromJsonCodeActionParams_fromJson(lean_object*);
static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__7;
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0_spec__0___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_runRefreshTasks_sleepWithCancellation___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__1(lean_object*);
lean_object* lean_array_get_size(lean_object*);
LEAN_EXPORT lean_object* l_panic___at___00Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0_spec__0(lean_object*, lean_object*, lean_object*);
static lean_object* l_Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3___closed__0;
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_handleRpcRelease_spec__0(lean_object*, lean_object*, uint64_t);
extern lean_object* l_Lean_Elab_inServer;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Server_mkFileProgressDoneNotification(lean_object*);
lean_object* l_Lean_Server_moduleFromDocumentUri(lean_object*);
extern lean_object* l_Lean_Server_RequestError_requestCancelled;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__19(size_t, size_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_modifyPartialHandler_spec__0___redArg___boxed(lean_object*, lean_object*);
lean_object* lean_int_neg(lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__22;
static lean_object* l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__3;
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9(lean_object*, lean_object*);
uint8_t lean_nat_dec_le(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_modifyPartialHandler_spec__0___redArg(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_instInhabitedOutputMessage_default___closed__0;
lean_object* l_Lean_MessageLog_toArray(lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_handleDidChange_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_initFn___closed__8_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
uint8_t lean_usize_dec_lt(size_t, size_t);
static lean_object* l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__7;
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_handleDidChange_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handleNotification___closed__2;
lean_object* l_Lean_Server_FileWorker_handleResolveImportAllUnknownIdentifiersCodeAction_x3f(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__1(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Server_FileWorker_initializeWorker_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__4_spec__4(lean_object*);
LEAN_EXPORT lean_object* l_IO_ofExcept___at___00Lean_Server_FileWorker_handleImportCompletionRequest_spec__0___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Widget_msgToInteractiveDiagnostic(lean_object*, lean_object*, uint8_t);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__44;
lean_object* lean_nat_add(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg(lean_object*, lean_object*, lean_object*);
static lean_object* l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__1;
static lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__3;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initAndRunWorker(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcKeepAlive___redArg(lean_object*, lean_object*);
static lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__1;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__18;
lean_object* l_ImportCompletion_find(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__1;
uint8_t l_Lean_KVMap_contains(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8_spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_initFn___closed__2_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
static lean_object* l_Lean_Server_FileWorker_setupImports___closed__14;
lean_object* l___private_Lean_Data_Lsp_Communication_0__IO_FS_Stream_readLspHeader(lean_object*);
lean_object* l_Lean_Json_pretty(lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_setupImports___closed__1;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__25;
LEAN_EXPORT lean_object* l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0_spec__0(lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_importsLoadedRef;
lean_object* lean_array_uset(lean_object*, size_t, lean_object*);
static lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__3;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10_spec__10_spec__10___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__6(lean_object*, lean_object*);
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode___closed__0;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRequest___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Lsp_instToJsonDiagnosticRelatedInformation_toJson(lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_mainLoop_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_emitRequestResponse___redArg___lam__0___closed__0;
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__20;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___redArg___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Server_handleLspRequest(lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_getImportClosure_x3f___closed__0;
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkImportClosureNotification(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__17___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__54;
lean_object* l_Lean_Widget_instFromJsonGetInteractiveDiagnosticsParams_fromJson(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcKeepAlive___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__0;
static lean_object* l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__0;
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleResponse___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Lsp_instFromJsonLeanStaleDependencyParams_fromJson(lean_object*);
lean_object* l_Lean_Lsp_instFromJsonClientInfo_fromJson(lean_object*);
lean_object* l_Lean_Widget_TaggedText_stripTags___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__1(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_setupImports___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__1;
static lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__1;
lean_object* l_Lean_Server_RequestError_invalidParams(lean_object*);
static lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__38;
uint8_t l_Lean_Lsp_ClientCapabilities_silentDiagnosticSupport(lean_object*);
static lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__2;
lean_object* l_Lean_Json_getInt_x3f(lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoUpdateNotification___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12(lean_object*, lean_object*, lean_object*);
static lean_object* _init_l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("", 0, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; 
x_1 = lean_box(0);
x_2 = lean_unsigned_to_nat(0u);
x_3 = l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default___closed__0;
x_4 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_4, 0, x_3);
lean_ctor_set(x_4, 1, x_2);
lean_ctor_set(x_4, 2, x_1);
return x_4;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default() {
_start:
{
lean_object* x_1; 
x_1 = l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default___closed__1;
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo() {
_start:
{
lean_object* x_1; 
x_1 = l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default;
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_instInhabitedOutputMessage_default___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default___closed__0;
x_2 = lean_box(0);
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_instInhabitedOutputMessage_default() {
_start:
{
lean_object* x_1; 
x_1 = l_Lean_Server_FileWorker_instInhabitedOutputMessage_default___closed__0;
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_instInhabitedOutputMessage() {
_start:
{
lean_object* x_1; 
x_1 = l_Lean_Server_FileWorker_instInhabitedOutputMessage_default;
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_OutputMessage_ofLspResponse(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_7; 
x_7 = lean_ctor_get(x_2, 0);
lean_inc(x_7);
if (lean_obj_tag(x_7) == 0)
{
lean_object* x_8; 
x_8 = lean_box(0);
x_3 = x_8;
goto block_6;
}
else
{
uint8_t x_9; 
x_9 = !lean_is_exclusive(x_7);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11; 
x_10 = lean_ctor_get(x_7, 0);
lean_inc(x_1);
x_11 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_11, 0, x_1);
lean_ctor_set(x_11, 1, x_10);
lean_ctor_set(x_7, 0, x_11);
x_3 = x_7;
goto block_6;
}
else
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; 
x_12 = lean_ctor_get(x_7, 0);
lean_inc(x_12);
lean_dec(x_7);
lean_inc(x_1);
x_13 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_13, 0, x_1);
lean_ctor_set(x_13, 1, x_12);
x_14 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_14, 0, x_13);
x_3 = x_14;
goto block_6;
}
}
block_6:
{
lean_object* x_4; lean_object* x_5; 
x_4 = l_Lean_Server_SerializedLspResponse_toSerializedMessage(x_1, x_2);
lean_dec_ref(x_2);
x_5 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_5, 0, x_3);
lean_ctor_set(x_5, 1, x_4);
return x_5;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__1(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_3; 
lean_dec_ref(x_1);
x_3 = lean_box(0);
return x_3;
}
else
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; 
x_4 = lean_ctor_get(x_2, 0);
lean_inc(x_4);
x_5 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_5, 0, x_1);
lean_ctor_set(x_5, 1, x_4);
x_6 = lean_box(0);
x_7 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_7, 0, x_5);
lean_ctor_set(x_7, 1, x_6);
return x_7;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__0(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_3; 
lean_dec_ref(x_1);
x_3 = lean_box(0);
return x_3;
}
else
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; 
x_4 = lean_ctor_get(x_2, 0);
lean_inc(x_4);
lean_dec_ref(x_2);
x_5 = l_Lean_Json_Structured_toJson(x_4);
x_6 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_6, 0, x_1);
lean_ctor_set(x_6, 1, x_5);
x_7 = lean_box(0);
x_8 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_8, 0, x_6);
lean_ctor_set(x_8, 1, x_7);
return x_8;
}
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("jsonrpc", 7, 7);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("2.0", 3, 3);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__1;
x_2 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__2;
x_2 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__0;
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__4() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("id", 2, 2);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__5() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("method", 6, 6);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__6() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("params", 6, 6);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__7() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("result", 6, 6);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__8() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("message", 7, 7);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__9() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("data", 4, 4);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__10() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("error", 5, 5);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__11() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("code", 4, 4);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__12() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(32700u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__13() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__12;
x_2 = lean_int_neg(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__14() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__13;
x_2 = l_Lean_JsonNumber_fromInt(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__15() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__14;
x_2 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__16() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(32600u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__17() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__16;
x_2 = lean_int_neg(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__18() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__17;
x_2 = l_Lean_JsonNumber_fromInt(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__19() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__18;
x_2 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__20() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(32601u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__21() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__20;
x_2 = lean_int_neg(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__22() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__21;
x_2 = l_Lean_JsonNumber_fromInt(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__23() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__22;
x_2 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__24() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(32602u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__25() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__24;
x_2 = lean_int_neg(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__26() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__25;
x_2 = l_Lean_JsonNumber_fromInt(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__27() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__26;
x_2 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__28() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(32603u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__29() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__28;
x_2 = lean_int_neg(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__30() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__29;
x_2 = l_Lean_JsonNumber_fromInt(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__31() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__30;
x_2 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__32() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(32002u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__33() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__32;
x_2 = lean_int_neg(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__34() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__33;
x_2 = l_Lean_JsonNumber_fromInt(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__35() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__34;
x_2 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__36() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(32001u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__37() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__36;
x_2 = lean_int_neg(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__38() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__37;
x_2 = l_Lean_JsonNumber_fromInt(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__39() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__38;
x_2 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__40() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(32801u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__41() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__40;
x_2 = lean_int_neg(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__42() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__41;
x_2 = l_Lean_JsonNumber_fromInt(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__43() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__42;
x_2 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__44() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(32800u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__45() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__44;
x_2 = lean_int_neg(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__46() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__45;
x_2 = l_Lean_JsonNumber_fromInt(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__47() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__46;
x_2 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__48() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(32900u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__49() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__48;
x_2 = lean_int_neg(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__50() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__49;
x_2 = l_Lean_JsonNumber_fromInt(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__51() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__50;
x_2 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__52() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(32901u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__53() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__52;
x_2 = lean_int_neg(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__54() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__53;
x_2 = l_Lean_JsonNumber_fromInt(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__55() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__54;
x_2 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__56() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(32902u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__57() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__56;
x_2 = lean_int_neg(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__58() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__57;
x_2 = l_Lean_JsonNumber_fromInt(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__59() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__58;
x_2 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_OutputMessage_ofMsg(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4; 
lean_inc_ref(x_1);
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
x_3 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__3;
switch (lean_obj_tag(x_1)) {
case 0:
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 
x_10 = lean_ctor_get(x_1, 0);
lean_inc(x_10);
x_11 = lean_ctor_get(x_1, 1);
lean_inc_ref(x_11);
x_12 = lean_ctor_get(x_1, 2);
lean_inc(x_12);
lean_dec_ref(x_1);
x_13 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__4;
switch (lean_obj_tag(x_10)) {
case 0:
{
uint8_t x_26; 
x_26 = !lean_is_exclusive(x_10);
if (x_26 == 0)
{
lean_ctor_set_tag(x_10, 3);
x_14 = x_10;
goto block_25;
}
else
{
lean_object* x_27; lean_object* x_28; 
x_27 = lean_ctor_get(x_10, 0);
lean_inc(x_27);
lean_dec(x_10);
x_28 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_28, 0, x_27);
x_14 = x_28;
goto block_25;
}
}
case 1:
{
uint8_t x_29; 
x_29 = !lean_is_exclusive(x_10);
if (x_29 == 0)
{
lean_ctor_set_tag(x_10, 2);
x_14 = x_10;
goto block_25;
}
else
{
lean_object* x_30; lean_object* x_31; 
x_30 = lean_ctor_get(x_10, 0);
lean_inc(x_30);
lean_dec(x_10);
x_31 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_31, 0, x_30);
x_14 = x_31;
goto block_25;
}
}
default: 
{
lean_object* x_32; 
x_32 = lean_box(0);
x_14 = x_32;
goto block_25;
}
}
block_25:
{
lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; 
x_15 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_15, 0, x_13);
lean_ctor_set(x_15, 1, x_14);
x_16 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__5;
x_17 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_17, 0, x_11);
x_18 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_18, 0, x_16);
lean_ctor_set(x_18, 1, x_17);
x_19 = lean_box(0);
x_20 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_20, 0, x_18);
lean_ctor_set(x_20, 1, x_19);
x_21 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_21, 0, x_15);
lean_ctor_set(x_21, 1, x_20);
x_22 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__6;
x_23 = l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__0(x_22, x_12);
x_24 = l_List_appendTR___redArg(x_21, x_23);
x_4 = x_24;
goto block_9;
}
}
case 1:
{
uint8_t x_33; 
x_33 = !lean_is_exclusive(x_1);
if (x_33 == 0)
{
lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; 
x_34 = lean_ctor_get(x_1, 0);
x_35 = lean_ctor_get(x_1, 1);
x_36 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__5;
x_37 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_37, 0, x_34);
lean_ctor_set_tag(x_1, 0);
lean_ctor_set(x_1, 1, x_37);
lean_ctor_set(x_1, 0, x_36);
x_38 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__6;
x_39 = l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__0(x_38, x_35);
x_40 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_40, 0, x_1);
lean_ctor_set(x_40, 1, x_39);
x_4 = x_40;
goto block_9;
}
else
{
lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; 
x_41 = lean_ctor_get(x_1, 0);
x_42 = lean_ctor_get(x_1, 1);
lean_inc(x_42);
lean_inc(x_41);
lean_dec(x_1);
x_43 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__5;
x_44 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_44, 0, x_41);
x_45 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_45, 0, x_43);
lean_ctor_set(x_45, 1, x_44);
x_46 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__6;
x_47 = l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__0(x_46, x_42);
x_48 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_48, 0, x_45);
lean_ctor_set(x_48, 1, x_47);
x_4 = x_48;
goto block_9;
}
}
case 2:
{
lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; 
x_49 = lean_ctor_get(x_1, 0);
lean_inc(x_49);
x_50 = lean_ctor_get(x_1, 1);
lean_inc(x_50);
if (lean_is_exclusive(x_1)) {
 lean_ctor_release(x_1, 0);
 lean_ctor_release(x_1, 1);
 x_51 = x_1;
} else {
 lean_dec_ref(x_1);
 x_51 = lean_box(0);
}
x_52 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__4;
switch (lean_obj_tag(x_49)) {
case 0:
{
uint8_t x_61; 
x_61 = !lean_is_exclusive(x_49);
if (x_61 == 0)
{
lean_ctor_set_tag(x_49, 3);
x_53 = x_49;
goto block_60;
}
else
{
lean_object* x_62; lean_object* x_63; 
x_62 = lean_ctor_get(x_49, 0);
lean_inc(x_62);
lean_dec(x_49);
x_63 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_63, 0, x_62);
x_53 = x_63;
goto block_60;
}
}
case 1:
{
uint8_t x_64; 
x_64 = !lean_is_exclusive(x_49);
if (x_64 == 0)
{
lean_ctor_set_tag(x_49, 2);
x_53 = x_49;
goto block_60;
}
else
{
lean_object* x_65; lean_object* x_66; 
x_65 = lean_ctor_get(x_49, 0);
lean_inc(x_65);
lean_dec(x_49);
x_66 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_66, 0, x_65);
x_53 = x_66;
goto block_60;
}
}
default: 
{
lean_object* x_67; 
x_67 = lean_box(0);
x_53 = x_67;
goto block_60;
}
}
block_60:
{
lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; 
if (lean_is_scalar(x_51)) {
 x_54 = lean_alloc_ctor(0, 2, 0);
} else {
 x_54 = x_51;
 lean_ctor_set_tag(x_54, 0);
}
lean_ctor_set(x_54, 0, x_52);
lean_ctor_set(x_54, 1, x_53);
x_55 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__7;
x_56 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_56, 0, x_55);
lean_ctor_set(x_56, 1, x_50);
x_57 = lean_box(0);
x_58 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_58, 0, x_56);
lean_ctor_set(x_58, 1, x_57);
x_59 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_59, 0, x_54);
lean_ctor_set(x_59, 1, x_58);
x_4 = x_59;
goto block_9;
}
}
default: 
{
lean_object* x_68; uint8_t x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_91; lean_object* x_92; 
x_68 = lean_ctor_get(x_1, 0);
lean_inc(x_68);
x_69 = lean_ctor_get_uint8(x_1, sizeof(void*)*3);
x_70 = lean_ctor_get(x_1, 1);
lean_inc_ref(x_70);
x_71 = lean_ctor_get(x_1, 2);
lean_inc(x_71);
lean_dec_ref(x_1);
x_91 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__4;
switch (lean_obj_tag(x_68)) {
case 0:
{
uint8_t x_109; 
x_109 = !lean_is_exclusive(x_68);
if (x_109 == 0)
{
lean_ctor_set_tag(x_68, 3);
x_92 = x_68;
goto block_108;
}
else
{
lean_object* x_110; lean_object* x_111; 
x_110 = lean_ctor_get(x_68, 0);
lean_inc(x_110);
lean_dec(x_68);
x_111 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_111, 0, x_110);
x_92 = x_111;
goto block_108;
}
}
case 1:
{
uint8_t x_112; 
x_112 = !lean_is_exclusive(x_68);
if (x_112 == 0)
{
lean_ctor_set_tag(x_68, 2);
x_92 = x_68;
goto block_108;
}
else
{
lean_object* x_113; lean_object* x_114; 
x_113 = lean_ctor_get(x_68, 0);
lean_inc(x_113);
lean_dec(x_68);
x_114 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_114, 0, x_113);
x_92 = x_114;
goto block_108;
}
}
default: 
{
lean_object* x_115; 
x_115 = lean_box(0);
x_92 = x_115;
goto block_108;
}
}
block_90:
{
lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; 
x_76 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_76, 0, x_73);
lean_ctor_set(x_76, 1, x_75);
x_77 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__8;
x_78 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_78, 0, x_70);
x_79 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_79, 0, x_77);
lean_ctor_set(x_79, 1, x_78);
x_80 = lean_box(0);
x_81 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_81, 0, x_79);
lean_ctor_set(x_81, 1, x_80);
x_82 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_82, 0, x_76);
lean_ctor_set(x_82, 1, x_81);
x_83 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__9;
x_84 = l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__1(x_83, x_71);
lean_dec(x_71);
x_85 = l_List_appendTR___redArg(x_82, x_84);
x_86 = l_Lean_Json_mkObj(x_85);
x_87 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_87, 0, x_72);
lean_ctor_set(x_87, 1, x_86);
x_88 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_88, 0, x_87);
lean_ctor_set(x_88, 1, x_80);
x_89 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_89, 0, x_74);
lean_ctor_set(x_89, 1, x_88);
x_4 = x_89;
goto block_9;
}
block_108:
{
lean_object* x_93; lean_object* x_94; lean_object* x_95; 
x_93 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_93, 0, x_91);
lean_ctor_set(x_93, 1, x_92);
x_94 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__10;
x_95 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__11;
switch (x_69) {
case 0:
{
lean_object* x_96; 
x_96 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__15;
x_72 = x_94;
x_73 = x_95;
x_74 = x_93;
x_75 = x_96;
goto block_90;
}
case 1:
{
lean_object* x_97; 
x_97 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__19;
x_72 = x_94;
x_73 = x_95;
x_74 = x_93;
x_75 = x_97;
goto block_90;
}
case 2:
{
lean_object* x_98; 
x_98 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__23;
x_72 = x_94;
x_73 = x_95;
x_74 = x_93;
x_75 = x_98;
goto block_90;
}
case 3:
{
lean_object* x_99; 
x_99 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__27;
x_72 = x_94;
x_73 = x_95;
x_74 = x_93;
x_75 = x_99;
goto block_90;
}
case 4:
{
lean_object* x_100; 
x_100 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__31;
x_72 = x_94;
x_73 = x_95;
x_74 = x_93;
x_75 = x_100;
goto block_90;
}
case 5:
{
lean_object* x_101; 
x_101 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__35;
x_72 = x_94;
x_73 = x_95;
x_74 = x_93;
x_75 = x_101;
goto block_90;
}
case 6:
{
lean_object* x_102; 
x_102 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__39;
x_72 = x_94;
x_73 = x_95;
x_74 = x_93;
x_75 = x_102;
goto block_90;
}
case 7:
{
lean_object* x_103; 
x_103 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__43;
x_72 = x_94;
x_73 = x_95;
x_74 = x_93;
x_75 = x_103;
goto block_90;
}
case 8:
{
lean_object* x_104; 
x_104 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__47;
x_72 = x_94;
x_73 = x_95;
x_74 = x_93;
x_75 = x_104;
goto block_90;
}
case 9:
{
lean_object* x_105; 
x_105 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__51;
x_72 = x_94;
x_73 = x_95;
x_74 = x_93;
x_75 = x_105;
goto block_90;
}
case 10:
{
lean_object* x_106; 
x_106 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__55;
x_72 = x_94;
x_73 = x_95;
x_74 = x_93;
x_75 = x_106;
goto block_90;
}
default: 
{
lean_object* x_107; 
x_107 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__59;
x_72 = x_94;
x_73 = x_95;
x_74 = x_93;
x_75 = x_107;
goto block_90;
}
}
}
}
}
block_9:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; 
x_5 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_5, 0, x_3);
lean_ctor_set(x_5, 1, x_4);
x_6 = l_Lean_Json_mkObj(x_5);
x_7 = l_Lean_Json_compress(x_6);
x_8 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_8, 0, x_2);
lean_ctor_set(x_8, 1, x_7);
return x_8;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__1___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__1(x_1, x_2);
lean_dec(x_2);
return x_3;
}
}
static lean_object* _init_l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Key is not present in map", 25, 25);
return x_1;
}
}
static lean_object* _init_l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Std.DTreeMap.Internal.Impl.Const.get!", 37, 37);
return x_1;
}
}
static lean_object* _init_l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Std.Data.DTreeMap.Internal.Queries", 34, 34);
return x_1;
}
}
static lean_object* _init_l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_1 = l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__2;
x_2 = lean_unsigned_to_nat(13u);
x_3 = lean_unsigned_to_nat(221u);
x_4 = l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__1;
x_5 = l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__0;
x_6 = l_mkPanicMessageWithDecl(x_5, x_4, x_3, x_2, x_1);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; 
x_4 = lean_ctor_get(x_2, 1);
x_5 = lean_ctor_get(x_2, 2);
x_6 = lean_ctor_get(x_2, 3);
x_7 = lean_ctor_get(x_2, 4);
x_8 = lean_string_dec_lt(x_3, x_4);
if (x_8 == 0)
{
uint8_t x_9; 
x_9 = lean_string_dec_eq(x_3, x_4);
if (x_9 == 0)
{
x_2 = x_7;
goto _start;
}
else
{
lean_dec(x_1);
lean_inc(x_5);
return x_5;
}
}
else
{
x_2 = x_6;
goto _start;
}
}
else
{
lean_object* x_12; lean_object* x_13; 
x_12 = l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__3;
x_13 = lean_panic_fn(x_1, x_12);
return x_13;
}
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__2___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; 
x_4 = lean_ctor_get(x_3, 0);
lean_inc(x_4);
x_5 = lean_ctor_get(x_3, 1);
lean_inc(x_5);
x_6 = lean_ctor_get(x_3, 2);
lean_inc(x_6);
x_7 = lean_ctor_get(x_3, 3);
lean_inc(x_7);
x_8 = lean_ctor_get(x_3, 4);
lean_inc(x_8);
if (lean_is_exclusive(x_3)) {
 lean_ctor_release(x_3, 0);
 lean_ctor_release(x_3, 1);
 lean_ctor_release(x_3, 2);
 lean_ctor_release(x_3, 3);
 lean_ctor_release(x_3, 4);
 x_9 = x_3;
} else {
 lean_dec_ref(x_3);
 x_9 = lean_box(0);
}
x_10 = lean_string_dec_lt(x_1, x_5);
if (x_10 == 0)
{
uint8_t x_11; 
x_11 = lean_string_dec_eq(x_1, x_5);
if (x_11 == 0)
{
lean_object* x_12; lean_object* x_13; 
lean_dec(x_4);
x_12 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__2___redArg(x_1, x_2, x_8);
x_13 = lean_unsigned_to_nat(1u);
if (lean_obj_tag(x_7) == 0)
{
lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; 
x_14 = lean_ctor_get(x_7, 0);
x_15 = lean_ctor_get(x_12, 0);
lean_inc(x_15);
x_16 = lean_ctor_get(x_12, 1);
lean_inc(x_16);
x_17 = lean_ctor_get(x_12, 2);
lean_inc(x_17);
x_18 = lean_ctor_get(x_12, 3);
lean_inc(x_18);
x_19 = lean_ctor_get(x_12, 4);
lean_inc(x_19);
x_20 = lean_unsigned_to_nat(3u);
x_21 = lean_nat_mul(x_20, x_14);
x_22 = lean_nat_dec_lt(x_21, x_15);
lean_dec(x_21);
if (x_22 == 0)
{
lean_object* x_23; lean_object* x_24; lean_object* x_25; 
lean_dec(x_19);
lean_dec(x_18);
lean_dec(x_17);
lean_dec(x_16);
x_23 = lean_nat_add(x_13, x_14);
x_24 = lean_nat_add(x_23, x_15);
lean_dec(x_15);
lean_dec(x_23);
if (lean_is_scalar(x_9)) {
 x_25 = lean_alloc_ctor(0, 5, 0);
} else {
 x_25 = x_9;
}
lean_ctor_set(x_25, 0, x_24);
lean_ctor_set(x_25, 1, x_5);
lean_ctor_set(x_25, 2, x_6);
lean_ctor_set(x_25, 3, x_7);
lean_ctor_set(x_25, 4, x_12);
return x_25;
}
else
{
lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; 
if (lean_is_exclusive(x_12)) {
 lean_ctor_release(x_12, 0);
 lean_ctor_release(x_12, 1);
 lean_ctor_release(x_12, 2);
 lean_ctor_release(x_12, 3);
 lean_ctor_release(x_12, 4);
 x_26 = x_12;
} else {
 lean_dec_ref(x_12);
 x_26 = lean_box(0);
}
x_27 = lean_ctor_get(x_18, 0);
x_28 = lean_ctor_get(x_18, 1);
x_29 = lean_ctor_get(x_18, 2);
x_30 = lean_ctor_get(x_18, 3);
x_31 = lean_ctor_get(x_18, 4);
x_32 = lean_ctor_get(x_19, 0);
x_33 = lean_unsigned_to_nat(2u);
x_34 = lean_nat_mul(x_33, x_32);
x_35 = lean_nat_dec_lt(x_27, x_34);
lean_dec(x_34);
if (x_35 == 0)
{
lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_46; 
lean_inc(x_31);
lean_inc(x_30);
lean_inc(x_29);
lean_inc(x_28);
if (lean_is_exclusive(x_18)) {
 lean_ctor_release(x_18, 0);
 lean_ctor_release(x_18, 1);
 lean_ctor_release(x_18, 2);
 lean_ctor_release(x_18, 3);
 lean_ctor_release(x_18, 4);
 x_36 = x_18;
} else {
 lean_dec_ref(x_18);
 x_36 = lean_box(0);
}
x_37 = lean_nat_add(x_13, x_14);
x_38 = lean_nat_add(x_37, x_15);
lean_dec(x_15);
if (lean_obj_tag(x_30) == 0)
{
lean_object* x_53; 
x_53 = lean_ctor_get(x_30, 0);
lean_inc(x_53);
x_46 = x_53;
goto block_52;
}
else
{
lean_object* x_54; 
x_54 = lean_unsigned_to_nat(0u);
x_46 = x_54;
goto block_52;
}
block_45:
{
lean_object* x_42; lean_object* x_43; lean_object* x_44; 
x_42 = lean_nat_add(x_40, x_41);
lean_dec(x_41);
lean_dec(x_40);
if (lean_is_scalar(x_36)) {
 x_43 = lean_alloc_ctor(0, 5, 0);
} else {
 x_43 = x_36;
}
lean_ctor_set(x_43, 0, x_42);
lean_ctor_set(x_43, 1, x_16);
lean_ctor_set(x_43, 2, x_17);
lean_ctor_set(x_43, 3, x_31);
lean_ctor_set(x_43, 4, x_19);
if (lean_is_scalar(x_26)) {
 x_44 = lean_alloc_ctor(0, 5, 0);
} else {
 x_44 = x_26;
}
lean_ctor_set(x_44, 0, x_38);
lean_ctor_set(x_44, 1, x_28);
lean_ctor_set(x_44, 2, x_29);
lean_ctor_set(x_44, 3, x_39);
lean_ctor_set(x_44, 4, x_43);
return x_44;
}
block_52:
{
lean_object* x_47; lean_object* x_48; lean_object* x_49; 
x_47 = lean_nat_add(x_37, x_46);
lean_dec(x_46);
lean_dec(x_37);
if (lean_is_scalar(x_9)) {
 x_48 = lean_alloc_ctor(0, 5, 0);
} else {
 x_48 = x_9;
}
lean_ctor_set(x_48, 0, x_47);
lean_ctor_set(x_48, 1, x_5);
lean_ctor_set(x_48, 2, x_6);
lean_ctor_set(x_48, 3, x_7);
lean_ctor_set(x_48, 4, x_30);
x_49 = lean_nat_add(x_13, x_32);
if (lean_obj_tag(x_31) == 0)
{
lean_object* x_50; 
x_50 = lean_ctor_get(x_31, 0);
lean_inc(x_50);
x_39 = x_48;
x_40 = x_49;
x_41 = x_50;
goto block_45;
}
else
{
lean_object* x_51; 
x_51 = lean_unsigned_to_nat(0u);
x_39 = x_48;
x_40 = x_49;
x_41 = x_51;
goto block_45;
}
}
}
else
{
lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; uint8_t x_59; 
lean_dec(x_9);
x_55 = lean_nat_add(x_13, x_14);
x_56 = lean_nat_add(x_55, x_15);
lean_dec(x_15);
x_57 = lean_nat_add(x_55, x_27);
lean_dec(x_55);
lean_inc_ref(x_7);
if (lean_is_scalar(x_26)) {
 x_58 = lean_alloc_ctor(0, 5, 0);
} else {
 x_58 = x_26;
}
lean_ctor_set(x_58, 0, x_57);
lean_ctor_set(x_58, 1, x_5);
lean_ctor_set(x_58, 2, x_6);
lean_ctor_set(x_58, 3, x_7);
lean_ctor_set(x_58, 4, x_18);
x_59 = !lean_is_exclusive(x_7);
if (x_59 == 0)
{
lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; 
x_60 = lean_ctor_get(x_7, 4);
lean_dec(x_60);
x_61 = lean_ctor_get(x_7, 3);
lean_dec(x_61);
x_62 = lean_ctor_get(x_7, 2);
lean_dec(x_62);
x_63 = lean_ctor_get(x_7, 1);
lean_dec(x_63);
x_64 = lean_ctor_get(x_7, 0);
lean_dec(x_64);
lean_ctor_set(x_7, 4, x_19);
lean_ctor_set(x_7, 3, x_58);
lean_ctor_set(x_7, 2, x_17);
lean_ctor_set(x_7, 1, x_16);
lean_ctor_set(x_7, 0, x_56);
return x_7;
}
else
{
lean_object* x_65; 
lean_dec(x_7);
x_65 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_65, 0, x_56);
lean_ctor_set(x_65, 1, x_16);
lean_ctor_set(x_65, 2, x_17);
lean_ctor_set(x_65, 3, x_58);
lean_ctor_set(x_65, 4, x_19);
return x_65;
}
}
}
}
else
{
lean_object* x_66; 
x_66 = lean_ctor_get(x_12, 3);
lean_inc(x_66);
if (lean_obj_tag(x_66) == 0)
{
uint8_t x_67; 
x_67 = !lean_is_exclusive(x_12);
if (x_67 == 0)
{
lean_object* x_68; lean_object* x_69; lean_object* x_70; uint8_t x_71; 
x_68 = lean_ctor_get(x_12, 4);
x_69 = lean_ctor_get(x_12, 3);
lean_dec(x_69);
x_70 = lean_ctor_get(x_12, 0);
lean_dec(x_70);
x_71 = !lean_is_exclusive(x_66);
if (x_71 == 0)
{
lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; 
x_72 = lean_ctor_get(x_66, 1);
x_73 = lean_ctor_get(x_66, 2);
x_74 = lean_ctor_get(x_66, 4);
lean_dec(x_74);
x_75 = lean_ctor_get(x_66, 3);
lean_dec(x_75);
x_76 = lean_ctor_get(x_66, 0);
lean_dec(x_76);
x_77 = lean_unsigned_to_nat(3u);
lean_inc_n(x_68, 2);
lean_ctor_set(x_66, 4, x_68);
lean_ctor_set(x_66, 3, x_68);
lean_ctor_set(x_66, 2, x_6);
lean_ctor_set(x_66, 1, x_5);
lean_ctor_set(x_66, 0, x_13);
lean_inc(x_68);
lean_ctor_set(x_12, 3, x_68);
lean_ctor_set(x_12, 0, x_13);
if (lean_is_scalar(x_9)) {
 x_78 = lean_alloc_ctor(0, 5, 0);
} else {
 x_78 = x_9;
}
lean_ctor_set(x_78, 0, x_77);
lean_ctor_set(x_78, 1, x_72);
lean_ctor_set(x_78, 2, x_73);
lean_ctor_set(x_78, 3, x_66);
lean_ctor_set(x_78, 4, x_12);
return x_78;
}
else
{
lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; 
x_79 = lean_ctor_get(x_66, 1);
x_80 = lean_ctor_get(x_66, 2);
lean_inc(x_80);
lean_inc(x_79);
lean_dec(x_66);
x_81 = lean_unsigned_to_nat(3u);
lean_inc_n(x_68, 2);
x_82 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_82, 0, x_13);
lean_ctor_set(x_82, 1, x_5);
lean_ctor_set(x_82, 2, x_6);
lean_ctor_set(x_82, 3, x_68);
lean_ctor_set(x_82, 4, x_68);
lean_inc(x_68);
lean_ctor_set(x_12, 3, x_68);
lean_ctor_set(x_12, 0, x_13);
if (lean_is_scalar(x_9)) {
 x_83 = lean_alloc_ctor(0, 5, 0);
} else {
 x_83 = x_9;
}
lean_ctor_set(x_83, 0, x_81);
lean_ctor_set(x_83, 1, x_79);
lean_ctor_set(x_83, 2, x_80);
lean_ctor_set(x_83, 3, x_82);
lean_ctor_set(x_83, 4, x_12);
return x_83;
}
}
else
{
lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; 
x_84 = lean_ctor_get(x_12, 4);
x_85 = lean_ctor_get(x_12, 1);
x_86 = lean_ctor_get(x_12, 2);
lean_inc(x_84);
lean_inc(x_86);
lean_inc(x_85);
lean_dec(x_12);
x_87 = lean_ctor_get(x_66, 1);
lean_inc(x_87);
x_88 = lean_ctor_get(x_66, 2);
lean_inc(x_88);
if (lean_is_exclusive(x_66)) {
 lean_ctor_release(x_66, 0);
 lean_ctor_release(x_66, 1);
 lean_ctor_release(x_66, 2);
 lean_ctor_release(x_66, 3);
 lean_ctor_release(x_66, 4);
 x_89 = x_66;
} else {
 lean_dec_ref(x_66);
 x_89 = lean_box(0);
}
x_90 = lean_unsigned_to_nat(3u);
lean_inc_n(x_84, 2);
if (lean_is_scalar(x_89)) {
 x_91 = lean_alloc_ctor(0, 5, 0);
} else {
 x_91 = x_89;
}
lean_ctor_set(x_91, 0, x_13);
lean_ctor_set(x_91, 1, x_5);
lean_ctor_set(x_91, 2, x_6);
lean_ctor_set(x_91, 3, x_84);
lean_ctor_set(x_91, 4, x_84);
lean_inc(x_84);
x_92 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_92, 0, x_13);
lean_ctor_set(x_92, 1, x_85);
lean_ctor_set(x_92, 2, x_86);
lean_ctor_set(x_92, 3, x_84);
lean_ctor_set(x_92, 4, x_84);
if (lean_is_scalar(x_9)) {
 x_93 = lean_alloc_ctor(0, 5, 0);
} else {
 x_93 = x_9;
}
lean_ctor_set(x_93, 0, x_90);
lean_ctor_set(x_93, 1, x_87);
lean_ctor_set(x_93, 2, x_88);
lean_ctor_set(x_93, 3, x_91);
lean_ctor_set(x_93, 4, x_92);
return x_93;
}
}
else
{
lean_object* x_94; 
x_94 = lean_ctor_get(x_12, 4);
lean_inc(x_94);
if (lean_obj_tag(x_94) == 0)
{
uint8_t x_95; 
x_95 = !lean_is_exclusive(x_12);
if (x_95 == 0)
{
lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; 
x_96 = lean_ctor_get(x_12, 1);
x_97 = lean_ctor_get(x_12, 2);
x_98 = lean_ctor_get(x_12, 4);
lean_dec(x_98);
x_99 = lean_ctor_get(x_12, 3);
lean_dec(x_99);
x_100 = lean_ctor_get(x_12, 0);
lean_dec(x_100);
x_101 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_12, 4, x_66);
lean_ctor_set(x_12, 2, x_6);
lean_ctor_set(x_12, 1, x_5);
lean_ctor_set(x_12, 0, x_13);
if (lean_is_scalar(x_9)) {
 x_102 = lean_alloc_ctor(0, 5, 0);
} else {
 x_102 = x_9;
}
lean_ctor_set(x_102, 0, x_101);
lean_ctor_set(x_102, 1, x_96);
lean_ctor_set(x_102, 2, x_97);
lean_ctor_set(x_102, 3, x_12);
lean_ctor_set(x_102, 4, x_94);
return x_102;
}
else
{
lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; 
x_103 = lean_ctor_get(x_12, 1);
x_104 = lean_ctor_get(x_12, 2);
lean_inc(x_104);
lean_inc(x_103);
lean_dec(x_12);
x_105 = lean_unsigned_to_nat(3u);
x_106 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_106, 0, x_13);
lean_ctor_set(x_106, 1, x_5);
lean_ctor_set(x_106, 2, x_6);
lean_ctor_set(x_106, 3, x_66);
lean_ctor_set(x_106, 4, x_66);
if (lean_is_scalar(x_9)) {
 x_107 = lean_alloc_ctor(0, 5, 0);
} else {
 x_107 = x_9;
}
lean_ctor_set(x_107, 0, x_105);
lean_ctor_set(x_107, 1, x_103);
lean_ctor_set(x_107, 2, x_104);
lean_ctor_set(x_107, 3, x_106);
lean_ctor_set(x_107, 4, x_94);
return x_107;
}
}
else
{
lean_object* x_108; lean_object* x_109; 
x_108 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_9)) {
 x_109 = lean_alloc_ctor(0, 5, 0);
} else {
 x_109 = x_9;
}
lean_ctor_set(x_109, 0, x_108);
lean_ctor_set(x_109, 1, x_5);
lean_ctor_set(x_109, 2, x_6);
lean_ctor_set(x_109, 3, x_94);
lean_ctor_set(x_109, 4, x_12);
return x_109;
}
}
}
}
else
{
lean_object* x_110; 
lean_dec(x_6);
lean_dec(x_5);
if (lean_is_scalar(x_9)) {
 x_110 = lean_alloc_ctor(0, 5, 0);
} else {
 x_110 = x_9;
}
lean_ctor_set(x_110, 0, x_4);
lean_ctor_set(x_110, 1, x_1);
lean_ctor_set(x_110, 2, x_2);
lean_ctor_set(x_110, 3, x_7);
lean_ctor_set(x_110, 4, x_8);
return x_110;
}
}
else
{
lean_object* x_111; lean_object* x_112; 
lean_dec(x_4);
x_111 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__2___redArg(x_1, x_2, x_7);
x_112 = lean_unsigned_to_nat(1u);
if (lean_obj_tag(x_8) == 0)
{
lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; uint8_t x_121; 
x_113 = lean_ctor_get(x_8, 0);
x_114 = lean_ctor_get(x_111, 0);
lean_inc(x_114);
x_115 = lean_ctor_get(x_111, 1);
lean_inc(x_115);
x_116 = lean_ctor_get(x_111, 2);
lean_inc(x_116);
x_117 = lean_ctor_get(x_111, 3);
lean_inc(x_117);
x_118 = lean_ctor_get(x_111, 4);
lean_inc(x_118);
x_119 = lean_unsigned_to_nat(3u);
x_120 = lean_nat_mul(x_119, x_113);
x_121 = lean_nat_dec_lt(x_120, x_114);
lean_dec(x_120);
if (x_121 == 0)
{
lean_object* x_122; lean_object* x_123; lean_object* x_124; 
lean_dec(x_118);
lean_dec(x_117);
lean_dec(x_116);
lean_dec(x_115);
x_122 = lean_nat_add(x_112, x_114);
lean_dec(x_114);
x_123 = lean_nat_add(x_122, x_113);
lean_dec(x_122);
if (lean_is_scalar(x_9)) {
 x_124 = lean_alloc_ctor(0, 5, 0);
} else {
 x_124 = x_9;
}
lean_ctor_set(x_124, 0, x_123);
lean_ctor_set(x_124, 1, x_5);
lean_ctor_set(x_124, 2, x_6);
lean_ctor_set(x_124, 3, x_111);
lean_ctor_set(x_124, 4, x_8);
return x_124;
}
else
{
lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; uint8_t x_134; 
if (lean_is_exclusive(x_111)) {
 lean_ctor_release(x_111, 0);
 lean_ctor_release(x_111, 1);
 lean_ctor_release(x_111, 2);
 lean_ctor_release(x_111, 3);
 lean_ctor_release(x_111, 4);
 x_125 = x_111;
} else {
 lean_dec_ref(x_111);
 x_125 = lean_box(0);
}
x_126 = lean_ctor_get(x_117, 0);
x_127 = lean_ctor_get(x_118, 0);
x_128 = lean_ctor_get(x_118, 1);
x_129 = lean_ctor_get(x_118, 2);
x_130 = lean_ctor_get(x_118, 3);
x_131 = lean_ctor_get(x_118, 4);
x_132 = lean_unsigned_to_nat(2u);
x_133 = lean_nat_mul(x_132, x_126);
x_134 = lean_nat_dec_lt(x_127, x_133);
lean_dec(x_133);
if (x_134 == 0)
{
lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_145; lean_object* x_146; 
lean_inc(x_131);
lean_inc(x_130);
lean_inc(x_129);
lean_inc(x_128);
if (lean_is_exclusive(x_118)) {
 lean_ctor_release(x_118, 0);
 lean_ctor_release(x_118, 1);
 lean_ctor_release(x_118, 2);
 lean_ctor_release(x_118, 3);
 lean_ctor_release(x_118, 4);
 x_135 = x_118;
} else {
 lean_dec_ref(x_118);
 x_135 = lean_box(0);
}
x_136 = lean_nat_add(x_112, x_114);
lean_dec(x_114);
x_137 = lean_nat_add(x_136, x_113);
lean_dec(x_136);
x_145 = lean_nat_add(x_112, x_126);
if (lean_obj_tag(x_130) == 0)
{
lean_object* x_153; 
x_153 = lean_ctor_get(x_130, 0);
lean_inc(x_153);
x_146 = x_153;
goto block_152;
}
else
{
lean_object* x_154; 
x_154 = lean_unsigned_to_nat(0u);
x_146 = x_154;
goto block_152;
}
block_144:
{
lean_object* x_141; lean_object* x_142; lean_object* x_143; 
x_141 = lean_nat_add(x_138, x_140);
lean_dec(x_140);
lean_dec(x_138);
if (lean_is_scalar(x_135)) {
 x_142 = lean_alloc_ctor(0, 5, 0);
} else {
 x_142 = x_135;
}
lean_ctor_set(x_142, 0, x_141);
lean_ctor_set(x_142, 1, x_5);
lean_ctor_set(x_142, 2, x_6);
lean_ctor_set(x_142, 3, x_131);
lean_ctor_set(x_142, 4, x_8);
if (lean_is_scalar(x_125)) {
 x_143 = lean_alloc_ctor(0, 5, 0);
} else {
 x_143 = x_125;
}
lean_ctor_set(x_143, 0, x_137);
lean_ctor_set(x_143, 1, x_128);
lean_ctor_set(x_143, 2, x_129);
lean_ctor_set(x_143, 3, x_139);
lean_ctor_set(x_143, 4, x_142);
return x_143;
}
block_152:
{
lean_object* x_147; lean_object* x_148; lean_object* x_149; 
x_147 = lean_nat_add(x_145, x_146);
lean_dec(x_146);
lean_dec(x_145);
if (lean_is_scalar(x_9)) {
 x_148 = lean_alloc_ctor(0, 5, 0);
} else {
 x_148 = x_9;
}
lean_ctor_set(x_148, 0, x_147);
lean_ctor_set(x_148, 1, x_115);
lean_ctor_set(x_148, 2, x_116);
lean_ctor_set(x_148, 3, x_117);
lean_ctor_set(x_148, 4, x_130);
x_149 = lean_nat_add(x_112, x_113);
if (lean_obj_tag(x_131) == 0)
{
lean_object* x_150; 
x_150 = lean_ctor_get(x_131, 0);
lean_inc(x_150);
x_138 = x_149;
x_139 = x_148;
x_140 = x_150;
goto block_144;
}
else
{
lean_object* x_151; 
x_151 = lean_unsigned_to_nat(0u);
x_138 = x_149;
x_139 = x_148;
x_140 = x_151;
goto block_144;
}
}
}
else
{
lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; uint8_t x_160; 
lean_dec(x_9);
x_155 = lean_nat_add(x_112, x_114);
lean_dec(x_114);
x_156 = lean_nat_add(x_155, x_113);
lean_dec(x_155);
x_157 = lean_nat_add(x_112, x_113);
x_158 = lean_nat_add(x_157, x_127);
lean_dec(x_157);
lean_inc_ref(x_8);
if (lean_is_scalar(x_125)) {
 x_159 = lean_alloc_ctor(0, 5, 0);
} else {
 x_159 = x_125;
}
lean_ctor_set(x_159, 0, x_158);
lean_ctor_set(x_159, 1, x_5);
lean_ctor_set(x_159, 2, x_6);
lean_ctor_set(x_159, 3, x_118);
lean_ctor_set(x_159, 4, x_8);
x_160 = !lean_is_exclusive(x_8);
if (x_160 == 0)
{
lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; 
x_161 = lean_ctor_get(x_8, 4);
lean_dec(x_161);
x_162 = lean_ctor_get(x_8, 3);
lean_dec(x_162);
x_163 = lean_ctor_get(x_8, 2);
lean_dec(x_163);
x_164 = lean_ctor_get(x_8, 1);
lean_dec(x_164);
x_165 = lean_ctor_get(x_8, 0);
lean_dec(x_165);
lean_ctor_set(x_8, 4, x_159);
lean_ctor_set(x_8, 3, x_117);
lean_ctor_set(x_8, 2, x_116);
lean_ctor_set(x_8, 1, x_115);
lean_ctor_set(x_8, 0, x_156);
return x_8;
}
else
{
lean_object* x_166; 
lean_dec(x_8);
x_166 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_166, 0, x_156);
lean_ctor_set(x_166, 1, x_115);
lean_ctor_set(x_166, 2, x_116);
lean_ctor_set(x_166, 3, x_117);
lean_ctor_set(x_166, 4, x_159);
return x_166;
}
}
}
}
else
{
lean_object* x_167; 
x_167 = lean_ctor_get(x_111, 3);
lean_inc(x_167);
if (lean_obj_tag(x_167) == 0)
{
uint8_t x_168; 
x_168 = !lean_is_exclusive(x_111);
if (x_168 == 0)
{
lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; 
x_169 = lean_ctor_get(x_111, 4);
x_170 = lean_ctor_get(x_111, 1);
x_171 = lean_ctor_get(x_111, 2);
x_172 = lean_ctor_get(x_111, 3);
lean_dec(x_172);
x_173 = lean_ctor_get(x_111, 0);
lean_dec(x_173);
x_174 = lean_unsigned_to_nat(3u);
lean_inc(x_169);
lean_ctor_set(x_111, 3, x_169);
lean_ctor_set(x_111, 2, x_6);
lean_ctor_set(x_111, 1, x_5);
lean_ctor_set(x_111, 0, x_112);
if (lean_is_scalar(x_9)) {
 x_175 = lean_alloc_ctor(0, 5, 0);
} else {
 x_175 = x_9;
}
lean_ctor_set(x_175, 0, x_174);
lean_ctor_set(x_175, 1, x_170);
lean_ctor_set(x_175, 2, x_171);
lean_ctor_set(x_175, 3, x_167);
lean_ctor_set(x_175, 4, x_111);
return x_175;
}
else
{
lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; 
x_176 = lean_ctor_get(x_111, 4);
x_177 = lean_ctor_get(x_111, 1);
x_178 = lean_ctor_get(x_111, 2);
lean_inc(x_176);
lean_inc(x_178);
lean_inc(x_177);
lean_dec(x_111);
x_179 = lean_unsigned_to_nat(3u);
lean_inc(x_176);
x_180 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_180, 0, x_112);
lean_ctor_set(x_180, 1, x_5);
lean_ctor_set(x_180, 2, x_6);
lean_ctor_set(x_180, 3, x_176);
lean_ctor_set(x_180, 4, x_176);
if (lean_is_scalar(x_9)) {
 x_181 = lean_alloc_ctor(0, 5, 0);
} else {
 x_181 = x_9;
}
lean_ctor_set(x_181, 0, x_179);
lean_ctor_set(x_181, 1, x_177);
lean_ctor_set(x_181, 2, x_178);
lean_ctor_set(x_181, 3, x_167);
lean_ctor_set(x_181, 4, x_180);
return x_181;
}
}
else
{
lean_object* x_182; 
x_182 = lean_ctor_get(x_111, 4);
lean_inc(x_182);
if (lean_obj_tag(x_182) == 0)
{
uint8_t x_183; 
x_183 = !lean_is_exclusive(x_111);
if (x_183 == 0)
{
lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; uint8_t x_189; 
x_184 = lean_ctor_get(x_111, 1);
x_185 = lean_ctor_get(x_111, 2);
x_186 = lean_ctor_get(x_111, 4);
lean_dec(x_186);
x_187 = lean_ctor_get(x_111, 3);
lean_dec(x_187);
x_188 = lean_ctor_get(x_111, 0);
lean_dec(x_188);
x_189 = !lean_is_exclusive(x_182);
if (x_189 == 0)
{
lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; 
x_190 = lean_ctor_get(x_182, 1);
x_191 = lean_ctor_get(x_182, 2);
x_192 = lean_ctor_get(x_182, 4);
lean_dec(x_192);
x_193 = lean_ctor_get(x_182, 3);
lean_dec(x_193);
x_194 = lean_ctor_get(x_182, 0);
lean_dec(x_194);
x_195 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_182, 4, x_167);
lean_ctor_set(x_182, 3, x_167);
lean_ctor_set(x_182, 2, x_185);
lean_ctor_set(x_182, 1, x_184);
lean_ctor_set(x_182, 0, x_112);
lean_ctor_set(x_111, 4, x_167);
lean_ctor_set(x_111, 2, x_6);
lean_ctor_set(x_111, 1, x_5);
lean_ctor_set(x_111, 0, x_112);
if (lean_is_scalar(x_9)) {
 x_196 = lean_alloc_ctor(0, 5, 0);
} else {
 x_196 = x_9;
}
lean_ctor_set(x_196, 0, x_195);
lean_ctor_set(x_196, 1, x_190);
lean_ctor_set(x_196, 2, x_191);
lean_ctor_set(x_196, 3, x_182);
lean_ctor_set(x_196, 4, x_111);
return x_196;
}
else
{
lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; 
x_197 = lean_ctor_get(x_182, 1);
x_198 = lean_ctor_get(x_182, 2);
lean_inc(x_198);
lean_inc(x_197);
lean_dec(x_182);
x_199 = lean_unsigned_to_nat(3u);
x_200 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_200, 0, x_112);
lean_ctor_set(x_200, 1, x_184);
lean_ctor_set(x_200, 2, x_185);
lean_ctor_set(x_200, 3, x_167);
lean_ctor_set(x_200, 4, x_167);
lean_ctor_set(x_111, 4, x_167);
lean_ctor_set(x_111, 2, x_6);
lean_ctor_set(x_111, 1, x_5);
lean_ctor_set(x_111, 0, x_112);
if (lean_is_scalar(x_9)) {
 x_201 = lean_alloc_ctor(0, 5, 0);
} else {
 x_201 = x_9;
}
lean_ctor_set(x_201, 0, x_199);
lean_ctor_set(x_201, 1, x_197);
lean_ctor_set(x_201, 2, x_198);
lean_ctor_set(x_201, 3, x_200);
lean_ctor_set(x_201, 4, x_111);
return x_201;
}
}
else
{
lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; 
x_202 = lean_ctor_get(x_111, 1);
x_203 = lean_ctor_get(x_111, 2);
lean_inc(x_203);
lean_inc(x_202);
lean_dec(x_111);
x_204 = lean_ctor_get(x_182, 1);
lean_inc(x_204);
x_205 = lean_ctor_get(x_182, 2);
lean_inc(x_205);
if (lean_is_exclusive(x_182)) {
 lean_ctor_release(x_182, 0);
 lean_ctor_release(x_182, 1);
 lean_ctor_release(x_182, 2);
 lean_ctor_release(x_182, 3);
 lean_ctor_release(x_182, 4);
 x_206 = x_182;
} else {
 lean_dec_ref(x_182);
 x_206 = lean_box(0);
}
x_207 = lean_unsigned_to_nat(3u);
if (lean_is_scalar(x_206)) {
 x_208 = lean_alloc_ctor(0, 5, 0);
} else {
 x_208 = x_206;
}
lean_ctor_set(x_208, 0, x_112);
lean_ctor_set(x_208, 1, x_202);
lean_ctor_set(x_208, 2, x_203);
lean_ctor_set(x_208, 3, x_167);
lean_ctor_set(x_208, 4, x_167);
x_209 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_209, 0, x_112);
lean_ctor_set(x_209, 1, x_5);
lean_ctor_set(x_209, 2, x_6);
lean_ctor_set(x_209, 3, x_167);
lean_ctor_set(x_209, 4, x_167);
if (lean_is_scalar(x_9)) {
 x_210 = lean_alloc_ctor(0, 5, 0);
} else {
 x_210 = x_9;
}
lean_ctor_set(x_210, 0, x_207);
lean_ctor_set(x_210, 1, x_204);
lean_ctor_set(x_210, 2, x_205);
lean_ctor_set(x_210, 3, x_208);
lean_ctor_set(x_210, 4, x_209);
return x_210;
}
}
else
{
lean_object* x_211; lean_object* x_212; 
x_211 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_9)) {
 x_212 = lean_alloc_ctor(0, 5, 0);
} else {
 x_212 = x_9;
}
lean_ctor_set(x_212, 0, x_211);
lean_ctor_set(x_212, 1, x_5);
lean_ctor_set(x_212, 2, x_6);
lean_ctor_set(x_212, 3, x_111);
lean_ctor_set(x_212, 4, x_182);
return x_212;
}
}
}
}
}
else
{
lean_object* x_213; lean_object* x_214; 
x_213 = lean_unsigned_to_nat(1u);
x_214 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_214, 0, x_213);
lean_ctor_set(x_214, 1, x_1);
lean_ctor_set(x_214, 2, x_2);
lean_ctor_set(x_214, 3, x_3);
lean_ctor_set(x_214, 4, x_3);
return x_214;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; 
x_5 = lean_ctor_get(x_1, 4);
x_6 = lean_st_ref_take(x_5);
x_7 = l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default;
x_8 = l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg(x_7, x_6, x_2);
x_9 = lean_apply_1(x_3, x_8);
x_10 = lean_ctor_get(x_9, 0);
lean_inc(x_10);
x_11 = lean_ctor_get(x_9, 1);
lean_inc(x_11);
lean_dec_ref(x_9);
x_12 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__2___redArg(x_2, x_11, x_6);
x_13 = lean_st_ref_set(x_5, x_12);
return x_10;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler___redArg(x_2, x_3, x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg(x_2, x_3, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__2___redArg(x_2, x_3, x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_panic___at___00Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = lean_panic_fn(x_2, x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_panic___at___00Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0_spec__0___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = lean_panic_fn(x_1, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler(x_1, x_2, x_3, x_4);
lean_dec_ref(x_2);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0(x_1, x_2, x_3, x_4);
lean_dec_ref(x_4);
lean_dec(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler___redArg(x_1, x_2, x_3);
lean_dec_ref(x_1);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg(x_1, x_2, x_3);
lean_dec_ref(x_3);
lean_dec(x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_modifyPartialHandler_spec__0___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; 
x_3 = lean_ctor_get(x_1, 1);
x_4 = lean_ctor_get(x_1, 2);
x_5 = lean_ctor_get(x_1, 3);
x_6 = lean_ctor_get(x_1, 4);
x_7 = lean_string_dec_lt(x_2, x_3);
if (x_7 == 0)
{
uint8_t x_8; 
x_8 = lean_string_dec_eq(x_2, x_3);
if (x_8 == 0)
{
x_1 = x_6;
goto _start;
}
else
{
lean_object* x_10; 
lean_inc(x_4);
x_10 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_10, 0, x_4);
return x_10;
}
}
else
{
x_1 = x_5;
goto _start;
}
}
else
{
lean_object* x_12; 
x_12 = lean_box(0);
return x_12;
}
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_modifyPartialHandler_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_modifyPartialHandler_spec__0___redArg(x_2, x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_modifyPartialHandler(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; 
x_5 = lean_ctor_get(x_1, 4);
x_6 = lean_st_ref_take(x_5);
x_7 = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_modifyPartialHandler_spec__0___redArg(x_6, x_2);
if (lean_obj_tag(x_7) == 1)
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; 
x_8 = lean_ctor_get(x_7, 0);
lean_inc(x_8);
lean_dec_ref(x_7);
x_9 = lean_apply_1(x_3, x_8);
x_10 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__2___redArg(x_2, x_9, x_6);
x_11 = lean_st_ref_set(x_5, x_10);
return x_11;
}
else
{
lean_object* x_12; 
lean_dec(x_7);
lean_dec_ref(x_3);
lean_dec_ref(x_2);
x_12 = lean_st_ref_set(x_5, x_6);
return x_12;
}
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_modifyPartialHandler_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_modifyPartialHandler_spec__0(x_1, x_2, x_3);
lean_dec_ref(x_3);
lean_dec(x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_modifyPartialHandler___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_WorkerContext_modifyPartialHandler(x_1, x_2, x_3);
lean_dec_ref(x_1);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_modifyPartialHandler_spec__0___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_modifyPartialHandler_spec__0___redArg(x_1, x_2);
lean_dec_ref(x_2);
lean_dec(x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_updateRequestsInFlight___lam__0(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; 
x_3 = !lean_is_exclusive(x_2);
if (x_3 == 0)
{
lean_object* x_4; lean_object* x_5; 
x_4 = lean_ctor_get(x_2, 1);
x_5 = lean_apply_1(x_1, x_4);
lean_ctor_set(x_2, 1, x_5);
return x_2;
}
else
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
x_6 = lean_ctor_get(x_2, 0);
x_7 = lean_ctor_get(x_2, 1);
x_8 = lean_ctor_get(x_2, 2);
lean_inc(x_8);
lean_inc(x_7);
lean_inc(x_6);
lean_dec(x_2);
x_9 = lean_apply_1(x_1, x_7);
x_10 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_10, 0, x_6);
lean_ctor_set(x_10, 1, x_9);
lean_ctor_set(x_10, 2, x_8);
return x_10;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_updateRequestsInFlight(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; lean_object* x_6; 
x_5 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_WorkerContext_updateRequestsInFlight___lam__0), 2, 1);
lean_closure_set(x_5, 0, x_3);
x_6 = l_Lean_Server_FileWorker_WorkerContext_modifyPartialHandler(x_1, x_2, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_updateRequestsInFlight___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_WorkerContext_updateRequestsInFlight(x_1, x_2, x_3);
lean_dec_ref(x_1);
return x_5;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___redArg___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lean_JsonRpc_instOrdRequestID_ord___boxed), 2, 0);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___redArg___lam__0(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
uint8_t x_3; 
x_3 = !lean_is_exclusive(x_2);
if (x_3 == 0)
{
lean_object* x_4; lean_object* x_5; 
x_4 = lean_ctor_get(x_2, 0);
x_5 = lean_apply_1(x_1, x_4);
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_6; uint8_t x_7; lean_object* x_8; 
lean_free_object(x_2);
x_6 = lean_ctor_get(x_5, 0);
lean_inc(x_6);
lean_dec_ref(x_5);
x_7 = 3;
x_8 = lean_alloc_ctor(1, 1, 1);
lean_ctor_set(x_8, 0, x_6);
lean_ctor_set_uint8(x_8, sizeof(void*)*1, x_7);
return x_8;
}
else
{
lean_object* x_9; 
x_9 = lean_ctor_get(x_5, 0);
lean_inc(x_9);
lean_dec_ref(x_5);
lean_ctor_set(x_2, 0, x_9);
return x_2;
}
}
else
{
lean_object* x_10; lean_object* x_11; 
x_10 = lean_ctor_get(x_2, 0);
lean_inc(x_10);
lean_dec(x_2);
x_11 = lean_apply_1(x_1, x_10);
if (lean_obj_tag(x_11) == 0)
{
lean_object* x_12; uint8_t x_13; lean_object* x_14; 
x_12 = lean_ctor_get(x_11, 0);
lean_inc(x_12);
lean_dec_ref(x_11);
x_13 = 3;
x_14 = lean_alloc_ctor(1, 1, 1);
lean_ctor_set(x_14, 0, x_12);
lean_ctor_set_uint8(x_14, sizeof(void*)*1, x_13);
return x_14;
}
else
{
lean_object* x_15; lean_object* x_16; 
x_15 = lean_ctor_get(x_11, 0);
lean_inc(x_15);
lean_dec_ref(x_11);
x_16 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_16, 0, x_15);
return x_16;
}
}
}
else
{
uint8_t x_17; 
lean_dec_ref(x_1);
x_17 = !lean_is_exclusive(x_2);
if (x_17 == 0)
{
return x_2;
}
else
{
uint8_t x_18; lean_object* x_19; lean_object* x_20; 
x_18 = lean_ctor_get_uint8(x_2, sizeof(void*)*1);
x_19 = lean_ctor_get(x_2, 0);
lean_inc(x_19);
lean_dec(x_2);
x_20 = lean_alloc_ctor(1, 1, 1);
lean_ctor_set(x_20, 0, x_19);
lean_ctor_set_uint8(x_20, sizeof(void*)*1, x_18);
return x_20;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; 
x_5 = lean_io_promise_new();
x_6 = lean_ctor_get(x_2, 5);
x_7 = lean_st_ref_take(x_6);
x_8 = l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___redArg___closed__0;
lean_inc(x_5);
x_9 = l_Std_DTreeMap_Internal_Impl_insert___redArg(x_8, x_3, x_5, x_7);
x_10 = lean_st_ref_set(x_6, x_9);
x_11 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___redArg___lam__0), 2, 1);
lean_closure_set(x_11, 0, x_1);
x_12 = l_IO_Promise_result_x21___redArg(x_5);
lean_dec(x_5);
x_13 = l_Lean_Server_ServerTask_mapCheap___redArg(x_11, x_12);
return x_13;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___redArg(x_2, x_4, x_5);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest(x_1, x_2, x_3, x_4, x_5);
lean_dec_ref(x_4);
lean_dec(x_3);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___redArg(x_1, x_2, x_3);
lean_dec_ref(x_2);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__1___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; 
x_3 = lean_ctor_get(x_1, 1);
lean_inc(x_3);
x_4 = lean_ctor_get(x_1, 2);
lean_inc(x_4);
x_5 = lean_ctor_get(x_1, 3);
lean_inc(x_5);
x_6 = lean_ctor_get(x_1, 4);
lean_inc(x_6);
lean_dec_ref(x_1);
lean_inc(x_2);
x_7 = l_Lean_JsonRpc_instOrdRequestID_ord(x_2, x_3);
switch (x_7) {
case 0:
{
lean_dec(x_6);
lean_dec(x_4);
x_1 = x_5;
goto _start;
}
case 1:
{
lean_object* x_9; 
lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_2);
x_9 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_9, 0, x_4);
return x_9;
}
default: 
{
lean_dec(x_5);
lean_dec(x_4);
x_1 = x_6;
goto _start;
}
}
}
else
{
lean_object* x_11; 
lean_dec(x_2);
x_11 = lean_box(0);
return x_11;
}
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__1___redArg(x_2, x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__0___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; 
x_3 = lean_ctor_get(x_2, 1);
lean_inc(x_3);
x_4 = lean_ctor_get(x_2, 2);
lean_inc(x_4);
x_5 = lean_ctor_get(x_2, 3);
lean_inc(x_5);
x_6 = lean_ctor_get(x_2, 4);
lean_inc(x_6);
if (lean_is_exclusive(x_2)) {
 lean_ctor_release(x_2, 0);
 lean_ctor_release(x_2, 1);
 lean_ctor_release(x_2, 2);
 lean_ctor_release(x_2, 3);
 lean_ctor_release(x_2, 4);
 x_7 = x_2;
} else {
 lean_dec_ref(x_2);
 x_7 = lean_box(0);
}
lean_inc(x_3);
lean_inc(x_1);
x_8 = l_Lean_JsonRpc_instOrdRequestID_ord(x_1, x_3);
switch (x_8) {
case 0:
{
lean_object* x_9; lean_object* x_10; 
x_9 = l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__0___redArg(x_1, x_5);
x_10 = lean_unsigned_to_nat(1u);
if (lean_obj_tag(x_9) == 0)
{
if (lean_obj_tag(x_6) == 0)
{
lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; 
x_11 = lean_ctor_get(x_9, 0);
lean_inc(x_11);
x_12 = lean_ctor_get(x_6, 0);
x_13 = lean_ctor_get(x_6, 1);
x_14 = lean_ctor_get(x_6, 2);
x_15 = lean_ctor_get(x_6, 3);
lean_inc(x_15);
x_16 = lean_ctor_get(x_6, 4);
x_17 = lean_unsigned_to_nat(3u);
x_18 = lean_nat_mul(x_17, x_11);
x_19 = lean_nat_dec_lt(x_18, x_12);
lean_dec(x_18);
if (x_19 == 0)
{
lean_object* x_20; lean_object* x_21; lean_object* x_22; 
lean_dec(x_15);
x_20 = lean_nat_add(x_10, x_11);
lean_dec(x_11);
x_21 = lean_nat_add(x_20, x_12);
lean_dec(x_20);
if (lean_is_scalar(x_7)) {
 x_22 = lean_alloc_ctor(0, 5, 0);
} else {
 x_22 = x_7;
}
lean_ctor_set(x_22, 0, x_21);
lean_ctor_set(x_22, 1, x_3);
lean_ctor_set(x_22, 2, x_4);
lean_ctor_set(x_22, 3, x_9);
lean_ctor_set(x_22, 4, x_6);
return x_22;
}
else
{
lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; 
lean_inc(x_16);
lean_inc(x_14);
lean_inc(x_13);
lean_inc(x_12);
if (lean_is_exclusive(x_6)) {
 lean_ctor_release(x_6, 0);
 lean_ctor_release(x_6, 1);
 lean_ctor_release(x_6, 2);
 lean_ctor_release(x_6, 3);
 lean_ctor_release(x_6, 4);
 x_23 = x_6;
} else {
 lean_dec_ref(x_6);
 x_23 = lean_box(0);
}
x_24 = lean_ctor_get(x_15, 0);
x_25 = lean_ctor_get(x_15, 1);
x_26 = lean_ctor_get(x_15, 2);
x_27 = lean_ctor_get(x_15, 3);
x_28 = lean_ctor_get(x_15, 4);
x_29 = lean_ctor_get(x_16, 0);
x_30 = lean_unsigned_to_nat(2u);
x_31 = lean_nat_mul(x_30, x_29);
x_32 = lean_nat_dec_lt(x_24, x_31);
lean_dec(x_31);
if (x_32 == 0)
{
lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_43; 
lean_inc(x_28);
lean_inc(x_27);
lean_inc(x_26);
lean_inc(x_25);
if (lean_is_exclusive(x_15)) {
 lean_ctor_release(x_15, 0);
 lean_ctor_release(x_15, 1);
 lean_ctor_release(x_15, 2);
 lean_ctor_release(x_15, 3);
 lean_ctor_release(x_15, 4);
 x_33 = x_15;
} else {
 lean_dec_ref(x_15);
 x_33 = lean_box(0);
}
x_34 = lean_nat_add(x_10, x_11);
lean_dec(x_11);
x_35 = lean_nat_add(x_34, x_12);
lean_dec(x_12);
if (lean_obj_tag(x_27) == 0)
{
lean_object* x_50; 
x_50 = lean_ctor_get(x_27, 0);
lean_inc(x_50);
x_43 = x_50;
goto block_49;
}
else
{
lean_object* x_51; 
x_51 = lean_unsigned_to_nat(0u);
x_43 = x_51;
goto block_49;
}
block_42:
{
lean_object* x_39; lean_object* x_40; lean_object* x_41; 
x_39 = lean_nat_add(x_36, x_38);
lean_dec(x_38);
lean_dec(x_36);
if (lean_is_scalar(x_33)) {
 x_40 = lean_alloc_ctor(0, 5, 0);
} else {
 x_40 = x_33;
}
lean_ctor_set(x_40, 0, x_39);
lean_ctor_set(x_40, 1, x_13);
lean_ctor_set(x_40, 2, x_14);
lean_ctor_set(x_40, 3, x_28);
lean_ctor_set(x_40, 4, x_16);
if (lean_is_scalar(x_23)) {
 x_41 = lean_alloc_ctor(0, 5, 0);
} else {
 x_41 = x_23;
}
lean_ctor_set(x_41, 0, x_35);
lean_ctor_set(x_41, 1, x_25);
lean_ctor_set(x_41, 2, x_26);
lean_ctor_set(x_41, 3, x_37);
lean_ctor_set(x_41, 4, x_40);
return x_41;
}
block_49:
{
lean_object* x_44; lean_object* x_45; lean_object* x_46; 
x_44 = lean_nat_add(x_34, x_43);
lean_dec(x_43);
lean_dec(x_34);
if (lean_is_scalar(x_7)) {
 x_45 = lean_alloc_ctor(0, 5, 0);
} else {
 x_45 = x_7;
}
lean_ctor_set(x_45, 0, x_44);
lean_ctor_set(x_45, 1, x_3);
lean_ctor_set(x_45, 2, x_4);
lean_ctor_set(x_45, 3, x_9);
lean_ctor_set(x_45, 4, x_27);
x_46 = lean_nat_add(x_10, x_29);
if (lean_obj_tag(x_28) == 0)
{
lean_object* x_47; 
x_47 = lean_ctor_get(x_28, 0);
lean_inc(x_47);
x_36 = x_46;
x_37 = x_45;
x_38 = x_47;
goto block_42;
}
else
{
lean_object* x_48; 
x_48 = lean_unsigned_to_nat(0u);
x_36 = x_46;
x_37 = x_45;
x_38 = x_48;
goto block_42;
}
}
}
else
{
lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; uint8_t x_56; 
lean_dec(x_7);
x_52 = lean_nat_add(x_10, x_11);
lean_dec(x_11);
x_53 = lean_nat_add(x_52, x_12);
lean_dec(x_12);
x_54 = lean_nat_add(x_52, x_24);
lean_dec(x_52);
lean_inc_ref(x_9);
if (lean_is_scalar(x_23)) {
 x_55 = lean_alloc_ctor(0, 5, 0);
} else {
 x_55 = x_23;
}
lean_ctor_set(x_55, 0, x_54);
lean_ctor_set(x_55, 1, x_3);
lean_ctor_set(x_55, 2, x_4);
lean_ctor_set(x_55, 3, x_9);
lean_ctor_set(x_55, 4, x_15);
x_56 = !lean_is_exclusive(x_9);
if (x_56 == 0)
{
lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; 
x_57 = lean_ctor_get(x_9, 4);
lean_dec(x_57);
x_58 = lean_ctor_get(x_9, 3);
lean_dec(x_58);
x_59 = lean_ctor_get(x_9, 2);
lean_dec(x_59);
x_60 = lean_ctor_get(x_9, 1);
lean_dec(x_60);
x_61 = lean_ctor_get(x_9, 0);
lean_dec(x_61);
lean_ctor_set(x_9, 4, x_16);
lean_ctor_set(x_9, 3, x_55);
lean_ctor_set(x_9, 2, x_14);
lean_ctor_set(x_9, 1, x_13);
lean_ctor_set(x_9, 0, x_53);
return x_9;
}
else
{
lean_object* x_62; 
lean_dec(x_9);
x_62 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_62, 0, x_53);
lean_ctor_set(x_62, 1, x_13);
lean_ctor_set(x_62, 2, x_14);
lean_ctor_set(x_62, 3, x_55);
lean_ctor_set(x_62, 4, x_16);
return x_62;
}
}
}
}
else
{
lean_object* x_63; lean_object* x_64; lean_object* x_65; 
x_63 = lean_ctor_get(x_9, 0);
lean_inc(x_63);
x_64 = lean_nat_add(x_10, x_63);
lean_dec(x_63);
if (lean_is_scalar(x_7)) {
 x_65 = lean_alloc_ctor(0, 5, 0);
} else {
 x_65 = x_7;
}
lean_ctor_set(x_65, 0, x_64);
lean_ctor_set(x_65, 1, x_3);
lean_ctor_set(x_65, 2, x_4);
lean_ctor_set(x_65, 3, x_9);
lean_ctor_set(x_65, 4, x_6);
return x_65;
}
}
else
{
if (lean_obj_tag(x_6) == 0)
{
lean_object* x_66; 
x_66 = lean_ctor_get(x_6, 3);
lean_inc(x_66);
if (lean_obj_tag(x_66) == 0)
{
lean_object* x_67; 
x_67 = lean_ctor_get(x_6, 4);
lean_inc(x_67);
if (lean_obj_tag(x_67) == 0)
{
uint8_t x_68; 
x_68 = !lean_is_exclusive(x_6);
if (x_68 == 0)
{
lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; 
x_69 = lean_ctor_get(x_6, 0);
x_70 = lean_ctor_get(x_6, 1);
x_71 = lean_ctor_get(x_6, 2);
x_72 = lean_ctor_get(x_6, 4);
lean_dec(x_72);
x_73 = lean_ctor_get(x_6, 3);
lean_dec(x_73);
x_74 = lean_ctor_get(x_66, 0);
x_75 = lean_nat_add(x_10, x_69);
lean_dec(x_69);
x_76 = lean_nat_add(x_10, x_74);
lean_ctor_set(x_6, 4, x_66);
lean_ctor_set(x_6, 3, x_9);
lean_ctor_set(x_6, 2, x_4);
lean_ctor_set(x_6, 1, x_3);
lean_ctor_set(x_6, 0, x_76);
if (lean_is_scalar(x_7)) {
 x_77 = lean_alloc_ctor(0, 5, 0);
} else {
 x_77 = x_7;
}
lean_ctor_set(x_77, 0, x_75);
lean_ctor_set(x_77, 1, x_70);
lean_ctor_set(x_77, 2, x_71);
lean_ctor_set(x_77, 3, x_6);
lean_ctor_set(x_77, 4, x_67);
return x_77;
}
else
{
lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; 
x_78 = lean_ctor_get(x_6, 0);
x_79 = lean_ctor_get(x_6, 1);
x_80 = lean_ctor_get(x_6, 2);
lean_inc(x_80);
lean_inc(x_79);
lean_inc(x_78);
lean_dec(x_6);
x_81 = lean_ctor_get(x_66, 0);
x_82 = lean_nat_add(x_10, x_78);
lean_dec(x_78);
x_83 = lean_nat_add(x_10, x_81);
x_84 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_84, 0, x_83);
lean_ctor_set(x_84, 1, x_3);
lean_ctor_set(x_84, 2, x_4);
lean_ctor_set(x_84, 3, x_9);
lean_ctor_set(x_84, 4, x_66);
if (lean_is_scalar(x_7)) {
 x_85 = lean_alloc_ctor(0, 5, 0);
} else {
 x_85 = x_7;
}
lean_ctor_set(x_85, 0, x_82);
lean_ctor_set(x_85, 1, x_79);
lean_ctor_set(x_85, 2, x_80);
lean_ctor_set(x_85, 3, x_84);
lean_ctor_set(x_85, 4, x_67);
return x_85;
}
}
else
{
uint8_t x_86; 
x_86 = !lean_is_exclusive(x_6);
if (x_86 == 0)
{
lean_object* x_87; lean_object* x_88; lean_object* x_89; uint8_t x_90; 
x_87 = lean_ctor_get(x_6, 4);
lean_dec(x_87);
x_88 = lean_ctor_get(x_6, 3);
lean_dec(x_88);
x_89 = lean_ctor_get(x_6, 0);
lean_dec(x_89);
x_90 = !lean_is_exclusive(x_66);
if (x_90 == 0)
{
lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; 
x_91 = lean_ctor_get(x_66, 1);
x_92 = lean_ctor_get(x_66, 2);
x_93 = lean_ctor_get(x_66, 4);
lean_dec(x_93);
x_94 = lean_ctor_get(x_66, 3);
lean_dec(x_94);
x_95 = lean_ctor_get(x_66, 0);
lean_dec(x_95);
x_96 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_66, 4, x_67);
lean_ctor_set(x_66, 3, x_67);
lean_ctor_set(x_66, 2, x_4);
lean_ctor_set(x_66, 1, x_3);
lean_ctor_set(x_66, 0, x_10);
lean_ctor_set(x_6, 3, x_67);
lean_ctor_set(x_6, 0, x_10);
if (lean_is_scalar(x_7)) {
 x_97 = lean_alloc_ctor(0, 5, 0);
} else {
 x_97 = x_7;
}
lean_ctor_set(x_97, 0, x_96);
lean_ctor_set(x_97, 1, x_91);
lean_ctor_set(x_97, 2, x_92);
lean_ctor_set(x_97, 3, x_66);
lean_ctor_set(x_97, 4, x_6);
return x_97;
}
else
{
lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; 
x_98 = lean_ctor_get(x_66, 1);
x_99 = lean_ctor_get(x_66, 2);
lean_inc(x_99);
lean_inc(x_98);
lean_dec(x_66);
x_100 = lean_unsigned_to_nat(3u);
x_101 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_101, 0, x_10);
lean_ctor_set(x_101, 1, x_3);
lean_ctor_set(x_101, 2, x_4);
lean_ctor_set(x_101, 3, x_67);
lean_ctor_set(x_101, 4, x_67);
lean_ctor_set(x_6, 3, x_67);
lean_ctor_set(x_6, 0, x_10);
if (lean_is_scalar(x_7)) {
 x_102 = lean_alloc_ctor(0, 5, 0);
} else {
 x_102 = x_7;
}
lean_ctor_set(x_102, 0, x_100);
lean_ctor_set(x_102, 1, x_98);
lean_ctor_set(x_102, 2, x_99);
lean_ctor_set(x_102, 3, x_101);
lean_ctor_set(x_102, 4, x_6);
return x_102;
}
}
else
{
lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; 
x_103 = lean_ctor_get(x_6, 1);
x_104 = lean_ctor_get(x_6, 2);
lean_inc(x_104);
lean_inc(x_103);
lean_dec(x_6);
x_105 = lean_ctor_get(x_66, 1);
lean_inc(x_105);
x_106 = lean_ctor_get(x_66, 2);
lean_inc(x_106);
if (lean_is_exclusive(x_66)) {
 lean_ctor_release(x_66, 0);
 lean_ctor_release(x_66, 1);
 lean_ctor_release(x_66, 2);
 lean_ctor_release(x_66, 3);
 lean_ctor_release(x_66, 4);
 x_107 = x_66;
} else {
 lean_dec_ref(x_66);
 x_107 = lean_box(0);
}
x_108 = lean_unsigned_to_nat(3u);
if (lean_is_scalar(x_107)) {
 x_109 = lean_alloc_ctor(0, 5, 0);
} else {
 x_109 = x_107;
}
lean_ctor_set(x_109, 0, x_10);
lean_ctor_set(x_109, 1, x_3);
lean_ctor_set(x_109, 2, x_4);
lean_ctor_set(x_109, 3, x_67);
lean_ctor_set(x_109, 4, x_67);
x_110 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_110, 0, x_10);
lean_ctor_set(x_110, 1, x_103);
lean_ctor_set(x_110, 2, x_104);
lean_ctor_set(x_110, 3, x_67);
lean_ctor_set(x_110, 4, x_67);
if (lean_is_scalar(x_7)) {
 x_111 = lean_alloc_ctor(0, 5, 0);
} else {
 x_111 = x_7;
}
lean_ctor_set(x_111, 0, x_108);
lean_ctor_set(x_111, 1, x_105);
lean_ctor_set(x_111, 2, x_106);
lean_ctor_set(x_111, 3, x_109);
lean_ctor_set(x_111, 4, x_110);
return x_111;
}
}
}
else
{
lean_object* x_112; 
x_112 = lean_ctor_get(x_6, 4);
lean_inc(x_112);
if (lean_obj_tag(x_112) == 0)
{
uint8_t x_113; 
x_113 = !lean_is_exclusive(x_6);
if (x_113 == 0)
{
lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; 
x_114 = lean_ctor_get(x_6, 1);
x_115 = lean_ctor_get(x_6, 2);
x_116 = lean_ctor_get(x_6, 4);
lean_dec(x_116);
x_117 = lean_ctor_get(x_6, 3);
lean_dec(x_117);
x_118 = lean_ctor_get(x_6, 0);
lean_dec(x_118);
x_119 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_6, 4, x_66);
lean_ctor_set(x_6, 2, x_4);
lean_ctor_set(x_6, 1, x_3);
lean_ctor_set(x_6, 0, x_10);
if (lean_is_scalar(x_7)) {
 x_120 = lean_alloc_ctor(0, 5, 0);
} else {
 x_120 = x_7;
}
lean_ctor_set(x_120, 0, x_119);
lean_ctor_set(x_120, 1, x_114);
lean_ctor_set(x_120, 2, x_115);
lean_ctor_set(x_120, 3, x_6);
lean_ctor_set(x_120, 4, x_112);
return x_120;
}
else
{
lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; 
x_121 = lean_ctor_get(x_6, 1);
x_122 = lean_ctor_get(x_6, 2);
lean_inc(x_122);
lean_inc(x_121);
lean_dec(x_6);
x_123 = lean_unsigned_to_nat(3u);
x_124 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_124, 0, x_10);
lean_ctor_set(x_124, 1, x_3);
lean_ctor_set(x_124, 2, x_4);
lean_ctor_set(x_124, 3, x_66);
lean_ctor_set(x_124, 4, x_66);
if (lean_is_scalar(x_7)) {
 x_125 = lean_alloc_ctor(0, 5, 0);
} else {
 x_125 = x_7;
}
lean_ctor_set(x_125, 0, x_123);
lean_ctor_set(x_125, 1, x_121);
lean_ctor_set(x_125, 2, x_122);
lean_ctor_set(x_125, 3, x_124);
lean_ctor_set(x_125, 4, x_112);
return x_125;
}
}
else
{
uint8_t x_126; 
x_126 = !lean_is_exclusive(x_6);
if (x_126 == 0)
{
lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; 
x_127 = lean_ctor_get(x_6, 4);
lean_dec(x_127);
x_128 = lean_ctor_get(x_6, 3);
lean_dec(x_128);
lean_ctor_set(x_6, 3, x_112);
x_129 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_7)) {
 x_130 = lean_alloc_ctor(0, 5, 0);
} else {
 x_130 = x_7;
}
lean_ctor_set(x_130, 0, x_129);
lean_ctor_set(x_130, 1, x_3);
lean_ctor_set(x_130, 2, x_4);
lean_ctor_set(x_130, 3, x_112);
lean_ctor_set(x_130, 4, x_6);
return x_130;
}
else
{
lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; 
x_131 = lean_ctor_get(x_6, 0);
x_132 = lean_ctor_get(x_6, 1);
x_133 = lean_ctor_get(x_6, 2);
lean_inc(x_133);
lean_inc(x_132);
lean_inc(x_131);
lean_dec(x_6);
x_134 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_134, 0, x_131);
lean_ctor_set(x_134, 1, x_132);
lean_ctor_set(x_134, 2, x_133);
lean_ctor_set(x_134, 3, x_112);
lean_ctor_set(x_134, 4, x_112);
x_135 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_7)) {
 x_136 = lean_alloc_ctor(0, 5, 0);
} else {
 x_136 = x_7;
}
lean_ctor_set(x_136, 0, x_135);
lean_ctor_set(x_136, 1, x_3);
lean_ctor_set(x_136, 2, x_4);
lean_ctor_set(x_136, 3, x_112);
lean_ctor_set(x_136, 4, x_134);
return x_136;
}
}
}
}
else
{
lean_object* x_137; 
if (lean_is_scalar(x_7)) {
 x_137 = lean_alloc_ctor(0, 5, 0);
} else {
 x_137 = x_7;
}
lean_ctor_set(x_137, 0, x_10);
lean_ctor_set(x_137, 1, x_3);
lean_ctor_set(x_137, 2, x_4);
lean_ctor_set(x_137, 3, x_6);
lean_ctor_set(x_137, 4, x_6);
return x_137;
}
}
}
case 1:
{
lean_dec(x_7);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_1);
if (lean_obj_tag(x_5) == 0)
{
if (lean_obj_tag(x_6) == 0)
{
lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; uint8_t x_149; 
x_138 = lean_ctor_get(x_5, 0);
x_139 = lean_ctor_get(x_5, 1);
x_140 = lean_ctor_get(x_5, 2);
x_141 = lean_ctor_get(x_5, 3);
x_142 = lean_ctor_get(x_5, 4);
lean_inc(x_142);
x_143 = lean_ctor_get(x_6, 0);
x_144 = lean_ctor_get(x_6, 1);
x_145 = lean_ctor_get(x_6, 2);
x_146 = lean_ctor_get(x_6, 3);
lean_inc(x_146);
x_147 = lean_ctor_get(x_6, 4);
x_148 = lean_unsigned_to_nat(1u);
x_149 = lean_nat_dec_lt(x_138, x_143);
if (x_149 == 0)
{
lean_object* x_150; lean_object* x_151; lean_object* x_152; 
lean_inc(x_141);
lean_inc(x_140);
lean_inc(x_139);
if (lean_is_exclusive(x_5)) {
 lean_ctor_release(x_5, 0);
 lean_ctor_release(x_5, 1);
 lean_ctor_release(x_5, 2);
 lean_ctor_release(x_5, 3);
 lean_ctor_release(x_5, 4);
 x_150 = x_5;
} else {
 lean_dec_ref(x_5);
 x_150 = lean_box(0);
}
x_151 = l_Std_DTreeMap_Internal_Impl_maxView___redArg(x_139, x_140, x_141, x_142);
x_152 = lean_ctor_get(x_151, 2);
lean_inc(x_152);
if (lean_obj_tag(x_152) == 0)
{
lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; uint8_t x_158; 
x_153 = lean_ctor_get(x_151, 0);
lean_inc(x_153);
x_154 = lean_ctor_get(x_151, 1);
lean_inc(x_154);
lean_dec_ref(x_151);
x_155 = lean_ctor_get(x_152, 0);
x_156 = lean_unsigned_to_nat(3u);
x_157 = lean_nat_mul(x_156, x_155);
x_158 = lean_nat_dec_lt(x_157, x_143);
lean_dec(x_157);
if (x_158 == 0)
{
lean_object* x_159; lean_object* x_160; lean_object* x_161; 
lean_dec(x_146);
x_159 = lean_nat_add(x_148, x_155);
x_160 = lean_nat_add(x_159, x_143);
lean_dec(x_159);
if (lean_is_scalar(x_150)) {
 x_161 = lean_alloc_ctor(0, 5, 0);
} else {
 x_161 = x_150;
}
lean_ctor_set(x_161, 0, x_160);
lean_ctor_set(x_161, 1, x_153);
lean_ctor_set(x_161, 2, x_154);
lean_ctor_set(x_161, 3, x_152);
lean_ctor_set(x_161, 4, x_6);
return x_161;
}
else
{
lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; uint8_t x_171; 
lean_inc(x_147);
lean_inc(x_145);
lean_inc(x_144);
lean_inc(x_143);
if (lean_is_exclusive(x_6)) {
 lean_ctor_release(x_6, 0);
 lean_ctor_release(x_6, 1);
 lean_ctor_release(x_6, 2);
 lean_ctor_release(x_6, 3);
 lean_ctor_release(x_6, 4);
 x_162 = x_6;
} else {
 lean_dec_ref(x_6);
 x_162 = lean_box(0);
}
x_163 = lean_ctor_get(x_146, 0);
x_164 = lean_ctor_get(x_146, 1);
x_165 = lean_ctor_get(x_146, 2);
x_166 = lean_ctor_get(x_146, 3);
x_167 = lean_ctor_get(x_146, 4);
x_168 = lean_ctor_get(x_147, 0);
x_169 = lean_unsigned_to_nat(2u);
x_170 = lean_nat_mul(x_169, x_168);
x_171 = lean_nat_dec_lt(x_163, x_170);
lean_dec(x_170);
if (x_171 == 0)
{
lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_182; 
lean_inc(x_167);
lean_inc(x_166);
lean_inc(x_165);
lean_inc(x_164);
if (lean_is_exclusive(x_146)) {
 lean_ctor_release(x_146, 0);
 lean_ctor_release(x_146, 1);
 lean_ctor_release(x_146, 2);
 lean_ctor_release(x_146, 3);
 lean_ctor_release(x_146, 4);
 x_172 = x_146;
} else {
 lean_dec_ref(x_146);
 x_172 = lean_box(0);
}
x_173 = lean_nat_add(x_148, x_155);
x_174 = lean_nat_add(x_173, x_143);
lean_dec(x_143);
if (lean_obj_tag(x_166) == 0)
{
lean_object* x_189; 
x_189 = lean_ctor_get(x_166, 0);
lean_inc(x_189);
x_182 = x_189;
goto block_188;
}
else
{
lean_object* x_190; 
x_190 = lean_unsigned_to_nat(0u);
x_182 = x_190;
goto block_188;
}
block_181:
{
lean_object* x_178; lean_object* x_179; lean_object* x_180; 
x_178 = lean_nat_add(x_176, x_177);
lean_dec(x_177);
lean_dec(x_176);
if (lean_is_scalar(x_172)) {
 x_179 = lean_alloc_ctor(0, 5, 0);
} else {
 x_179 = x_172;
}
lean_ctor_set(x_179, 0, x_178);
lean_ctor_set(x_179, 1, x_144);
lean_ctor_set(x_179, 2, x_145);
lean_ctor_set(x_179, 3, x_167);
lean_ctor_set(x_179, 4, x_147);
if (lean_is_scalar(x_162)) {
 x_180 = lean_alloc_ctor(0, 5, 0);
} else {
 x_180 = x_162;
}
lean_ctor_set(x_180, 0, x_174);
lean_ctor_set(x_180, 1, x_164);
lean_ctor_set(x_180, 2, x_165);
lean_ctor_set(x_180, 3, x_175);
lean_ctor_set(x_180, 4, x_179);
return x_180;
}
block_188:
{
lean_object* x_183; lean_object* x_184; lean_object* x_185; 
x_183 = lean_nat_add(x_173, x_182);
lean_dec(x_182);
lean_dec(x_173);
if (lean_is_scalar(x_150)) {
 x_184 = lean_alloc_ctor(0, 5, 0);
} else {
 x_184 = x_150;
}
lean_ctor_set(x_184, 0, x_183);
lean_ctor_set(x_184, 1, x_153);
lean_ctor_set(x_184, 2, x_154);
lean_ctor_set(x_184, 3, x_152);
lean_ctor_set(x_184, 4, x_166);
x_185 = lean_nat_add(x_148, x_168);
if (lean_obj_tag(x_167) == 0)
{
lean_object* x_186; 
x_186 = lean_ctor_get(x_167, 0);
lean_inc(x_186);
x_175 = x_184;
x_176 = x_185;
x_177 = x_186;
goto block_181;
}
else
{
lean_object* x_187; 
x_187 = lean_unsigned_to_nat(0u);
x_175 = x_184;
x_176 = x_185;
x_177 = x_187;
goto block_181;
}
}
}
else
{
lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; 
x_191 = lean_nat_add(x_148, x_155);
x_192 = lean_nat_add(x_191, x_143);
lean_dec(x_143);
x_193 = lean_nat_add(x_191, x_163);
lean_dec(x_191);
if (lean_is_scalar(x_162)) {
 x_194 = lean_alloc_ctor(0, 5, 0);
} else {
 x_194 = x_162;
}
lean_ctor_set(x_194, 0, x_193);
lean_ctor_set(x_194, 1, x_153);
lean_ctor_set(x_194, 2, x_154);
lean_ctor_set(x_194, 3, x_152);
lean_ctor_set(x_194, 4, x_146);
if (lean_is_scalar(x_150)) {
 x_195 = lean_alloc_ctor(0, 5, 0);
} else {
 x_195 = x_150;
}
lean_ctor_set(x_195, 0, x_192);
lean_ctor_set(x_195, 1, x_144);
lean_ctor_set(x_195, 2, x_145);
lean_ctor_set(x_195, 3, x_194);
lean_ctor_set(x_195, 4, x_147);
return x_195;
}
}
}
else
{
uint8_t x_196; 
lean_inc(x_147);
lean_inc(x_145);
lean_inc(x_144);
lean_inc(x_143);
x_196 = !lean_is_exclusive(x_6);
if (x_196 == 0)
{
lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; 
x_197 = lean_ctor_get(x_6, 4);
lean_dec(x_197);
x_198 = lean_ctor_get(x_6, 3);
lean_dec(x_198);
x_199 = lean_ctor_get(x_6, 2);
lean_dec(x_199);
x_200 = lean_ctor_get(x_6, 1);
lean_dec(x_200);
x_201 = lean_ctor_get(x_6, 0);
lean_dec(x_201);
if (lean_obj_tag(x_146) == 0)
{
if (lean_obj_tag(x_147) == 0)
{
lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; 
x_202 = lean_ctor_get(x_151, 0);
lean_inc(x_202);
x_203 = lean_ctor_get(x_151, 1);
lean_inc(x_203);
lean_dec_ref(x_151);
x_204 = lean_ctor_get(x_146, 0);
x_205 = lean_nat_add(x_148, x_143);
lean_dec(x_143);
x_206 = lean_nat_add(x_148, x_204);
lean_ctor_set(x_6, 4, x_146);
lean_ctor_set(x_6, 3, x_152);
lean_ctor_set(x_6, 2, x_203);
lean_ctor_set(x_6, 1, x_202);
lean_ctor_set(x_6, 0, x_206);
if (lean_is_scalar(x_150)) {
 x_207 = lean_alloc_ctor(0, 5, 0);
} else {
 x_207 = x_150;
}
lean_ctor_set(x_207, 0, x_205);
lean_ctor_set(x_207, 1, x_144);
lean_ctor_set(x_207, 2, x_145);
lean_ctor_set(x_207, 3, x_6);
lean_ctor_set(x_207, 4, x_147);
return x_207;
}
else
{
lean_object* x_208; lean_object* x_209; uint8_t x_210; 
lean_dec(x_143);
x_208 = lean_ctor_get(x_151, 0);
lean_inc(x_208);
x_209 = lean_ctor_get(x_151, 1);
lean_inc(x_209);
lean_dec_ref(x_151);
x_210 = !lean_is_exclusive(x_146);
if (x_210 == 0)
{
lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; 
x_211 = lean_ctor_get(x_146, 1);
x_212 = lean_ctor_get(x_146, 2);
x_213 = lean_ctor_get(x_146, 4);
lean_dec(x_213);
x_214 = lean_ctor_get(x_146, 3);
lean_dec(x_214);
x_215 = lean_ctor_get(x_146, 0);
lean_dec(x_215);
x_216 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_146, 4, x_147);
lean_ctor_set(x_146, 3, x_147);
lean_ctor_set(x_146, 2, x_209);
lean_ctor_set(x_146, 1, x_208);
lean_ctor_set(x_146, 0, x_148);
lean_ctor_set(x_6, 3, x_147);
lean_ctor_set(x_6, 0, x_148);
if (lean_is_scalar(x_150)) {
 x_217 = lean_alloc_ctor(0, 5, 0);
} else {
 x_217 = x_150;
}
lean_ctor_set(x_217, 0, x_216);
lean_ctor_set(x_217, 1, x_211);
lean_ctor_set(x_217, 2, x_212);
lean_ctor_set(x_217, 3, x_146);
lean_ctor_set(x_217, 4, x_6);
return x_217;
}
else
{
lean_object* x_218; lean_object* x_219; lean_object* x_220; lean_object* x_221; lean_object* x_222; 
x_218 = lean_ctor_get(x_146, 1);
x_219 = lean_ctor_get(x_146, 2);
lean_inc(x_219);
lean_inc(x_218);
lean_dec(x_146);
x_220 = lean_unsigned_to_nat(3u);
x_221 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_221, 0, x_148);
lean_ctor_set(x_221, 1, x_208);
lean_ctor_set(x_221, 2, x_209);
lean_ctor_set(x_221, 3, x_147);
lean_ctor_set(x_221, 4, x_147);
lean_ctor_set(x_6, 3, x_147);
lean_ctor_set(x_6, 0, x_148);
if (lean_is_scalar(x_150)) {
 x_222 = lean_alloc_ctor(0, 5, 0);
} else {
 x_222 = x_150;
}
lean_ctor_set(x_222, 0, x_220);
lean_ctor_set(x_222, 1, x_218);
lean_ctor_set(x_222, 2, x_219);
lean_ctor_set(x_222, 3, x_221);
lean_ctor_set(x_222, 4, x_6);
return x_222;
}
}
}
else
{
if (lean_obj_tag(x_147) == 0)
{
lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; 
lean_dec(x_143);
x_223 = lean_ctor_get(x_151, 0);
lean_inc(x_223);
x_224 = lean_ctor_get(x_151, 1);
lean_inc(x_224);
lean_dec_ref(x_151);
x_225 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_6, 4, x_146);
lean_ctor_set(x_6, 2, x_224);
lean_ctor_set(x_6, 1, x_223);
lean_ctor_set(x_6, 0, x_148);
if (lean_is_scalar(x_150)) {
 x_226 = lean_alloc_ctor(0, 5, 0);
} else {
 x_226 = x_150;
}
lean_ctor_set(x_226, 0, x_225);
lean_ctor_set(x_226, 1, x_144);
lean_ctor_set(x_226, 2, x_145);
lean_ctor_set(x_226, 3, x_6);
lean_ctor_set(x_226, 4, x_147);
return x_226;
}
else
{
lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; 
x_227 = lean_ctor_get(x_151, 0);
lean_inc(x_227);
x_228 = lean_ctor_get(x_151, 1);
lean_inc(x_228);
lean_dec_ref(x_151);
lean_ctor_set(x_6, 3, x_147);
x_229 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_150)) {
 x_230 = lean_alloc_ctor(0, 5, 0);
} else {
 x_230 = x_150;
}
lean_ctor_set(x_230, 0, x_229);
lean_ctor_set(x_230, 1, x_227);
lean_ctor_set(x_230, 2, x_228);
lean_ctor_set(x_230, 3, x_147);
lean_ctor_set(x_230, 4, x_6);
return x_230;
}
}
}
else
{
lean_dec(x_6);
if (lean_obj_tag(x_146) == 0)
{
if (lean_obj_tag(x_147) == 0)
{
lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; 
x_231 = lean_ctor_get(x_151, 0);
lean_inc(x_231);
x_232 = lean_ctor_get(x_151, 1);
lean_inc(x_232);
lean_dec_ref(x_151);
x_233 = lean_ctor_get(x_146, 0);
x_234 = lean_nat_add(x_148, x_143);
lean_dec(x_143);
x_235 = lean_nat_add(x_148, x_233);
x_236 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_236, 0, x_235);
lean_ctor_set(x_236, 1, x_231);
lean_ctor_set(x_236, 2, x_232);
lean_ctor_set(x_236, 3, x_152);
lean_ctor_set(x_236, 4, x_146);
if (lean_is_scalar(x_150)) {
 x_237 = lean_alloc_ctor(0, 5, 0);
} else {
 x_237 = x_150;
}
lean_ctor_set(x_237, 0, x_234);
lean_ctor_set(x_237, 1, x_144);
lean_ctor_set(x_237, 2, x_145);
lean_ctor_set(x_237, 3, x_236);
lean_ctor_set(x_237, 4, x_147);
return x_237;
}
else
{
lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; 
lean_dec(x_143);
x_238 = lean_ctor_get(x_151, 0);
lean_inc(x_238);
x_239 = lean_ctor_get(x_151, 1);
lean_inc(x_239);
lean_dec_ref(x_151);
x_240 = lean_ctor_get(x_146, 1);
lean_inc(x_240);
x_241 = lean_ctor_get(x_146, 2);
lean_inc(x_241);
if (lean_is_exclusive(x_146)) {
 lean_ctor_release(x_146, 0);
 lean_ctor_release(x_146, 1);
 lean_ctor_release(x_146, 2);
 lean_ctor_release(x_146, 3);
 lean_ctor_release(x_146, 4);
 x_242 = x_146;
} else {
 lean_dec_ref(x_146);
 x_242 = lean_box(0);
}
x_243 = lean_unsigned_to_nat(3u);
if (lean_is_scalar(x_242)) {
 x_244 = lean_alloc_ctor(0, 5, 0);
} else {
 x_244 = x_242;
}
lean_ctor_set(x_244, 0, x_148);
lean_ctor_set(x_244, 1, x_238);
lean_ctor_set(x_244, 2, x_239);
lean_ctor_set(x_244, 3, x_147);
lean_ctor_set(x_244, 4, x_147);
x_245 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_245, 0, x_148);
lean_ctor_set(x_245, 1, x_144);
lean_ctor_set(x_245, 2, x_145);
lean_ctor_set(x_245, 3, x_147);
lean_ctor_set(x_245, 4, x_147);
if (lean_is_scalar(x_150)) {
 x_246 = lean_alloc_ctor(0, 5, 0);
} else {
 x_246 = x_150;
}
lean_ctor_set(x_246, 0, x_243);
lean_ctor_set(x_246, 1, x_240);
lean_ctor_set(x_246, 2, x_241);
lean_ctor_set(x_246, 3, x_244);
lean_ctor_set(x_246, 4, x_245);
return x_246;
}
}
else
{
if (lean_obj_tag(x_147) == 0)
{
lean_object* x_247; lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; 
lean_dec(x_143);
x_247 = lean_ctor_get(x_151, 0);
lean_inc(x_247);
x_248 = lean_ctor_get(x_151, 1);
lean_inc(x_248);
lean_dec_ref(x_151);
x_249 = lean_unsigned_to_nat(3u);
x_250 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_250, 0, x_148);
lean_ctor_set(x_250, 1, x_247);
lean_ctor_set(x_250, 2, x_248);
lean_ctor_set(x_250, 3, x_146);
lean_ctor_set(x_250, 4, x_146);
if (lean_is_scalar(x_150)) {
 x_251 = lean_alloc_ctor(0, 5, 0);
} else {
 x_251 = x_150;
}
lean_ctor_set(x_251, 0, x_249);
lean_ctor_set(x_251, 1, x_144);
lean_ctor_set(x_251, 2, x_145);
lean_ctor_set(x_251, 3, x_250);
lean_ctor_set(x_251, 4, x_147);
return x_251;
}
else
{
lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; 
x_252 = lean_ctor_get(x_151, 0);
lean_inc(x_252);
x_253 = lean_ctor_get(x_151, 1);
lean_inc(x_253);
lean_dec_ref(x_151);
x_254 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_254, 0, x_143);
lean_ctor_set(x_254, 1, x_144);
lean_ctor_set(x_254, 2, x_145);
lean_ctor_set(x_254, 3, x_147);
lean_ctor_set(x_254, 4, x_147);
x_255 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_150)) {
 x_256 = lean_alloc_ctor(0, 5, 0);
} else {
 x_256 = x_150;
}
lean_ctor_set(x_256, 0, x_255);
lean_ctor_set(x_256, 1, x_252);
lean_ctor_set(x_256, 2, x_253);
lean_ctor_set(x_256, 3, x_147);
lean_ctor_set(x_256, 4, x_254);
return x_256;
}
}
}
}
}
else
{
lean_object* x_257; lean_object* x_258; lean_object* x_259; 
lean_inc(x_147);
lean_inc(x_145);
lean_inc(x_144);
if (lean_is_exclusive(x_6)) {
 lean_ctor_release(x_6, 0);
 lean_ctor_release(x_6, 1);
 lean_ctor_release(x_6, 2);
 lean_ctor_release(x_6, 3);
 lean_ctor_release(x_6, 4);
 x_257 = x_6;
} else {
 lean_dec_ref(x_6);
 x_257 = lean_box(0);
}
x_258 = l_Std_DTreeMap_Internal_Impl_minView___redArg(x_144, x_145, x_146, x_147);
x_259 = lean_ctor_get(x_258, 2);
lean_inc(x_259);
if (lean_obj_tag(x_259) == 0)
{
lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264; uint8_t x_265; 
x_260 = lean_ctor_get(x_258, 0);
lean_inc(x_260);
x_261 = lean_ctor_get(x_258, 1);
lean_inc(x_261);
lean_dec_ref(x_258);
x_262 = lean_ctor_get(x_259, 0);
x_263 = lean_unsigned_to_nat(3u);
x_264 = lean_nat_mul(x_263, x_262);
x_265 = lean_nat_dec_lt(x_264, x_138);
lean_dec(x_264);
if (x_265 == 0)
{
lean_object* x_266; lean_object* x_267; lean_object* x_268; 
lean_dec(x_142);
x_266 = lean_nat_add(x_148, x_138);
x_267 = lean_nat_add(x_266, x_262);
lean_dec(x_266);
if (lean_is_scalar(x_257)) {
 x_268 = lean_alloc_ctor(0, 5, 0);
} else {
 x_268 = x_257;
}
lean_ctor_set(x_268, 0, x_267);
lean_ctor_set(x_268, 1, x_260);
lean_ctor_set(x_268, 2, x_261);
lean_ctor_set(x_268, 3, x_5);
lean_ctor_set(x_268, 4, x_259);
return x_268;
}
else
{
uint8_t x_269; 
lean_inc(x_141);
lean_inc(x_140);
lean_inc(x_139);
lean_inc(x_138);
x_269 = !lean_is_exclusive(x_5);
if (x_269 == 0)
{
lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; uint8_t x_283; 
x_270 = lean_ctor_get(x_5, 4);
lean_dec(x_270);
x_271 = lean_ctor_get(x_5, 3);
lean_dec(x_271);
x_272 = lean_ctor_get(x_5, 2);
lean_dec(x_272);
x_273 = lean_ctor_get(x_5, 1);
lean_dec(x_273);
x_274 = lean_ctor_get(x_5, 0);
lean_dec(x_274);
x_275 = lean_ctor_get(x_141, 0);
x_276 = lean_ctor_get(x_142, 0);
x_277 = lean_ctor_get(x_142, 1);
x_278 = lean_ctor_get(x_142, 2);
x_279 = lean_ctor_get(x_142, 3);
x_280 = lean_ctor_get(x_142, 4);
x_281 = lean_unsigned_to_nat(2u);
x_282 = lean_nat_mul(x_281, x_275);
x_283 = lean_nat_dec_lt(x_276, x_282);
lean_dec(x_282);
if (x_283 == 0)
{
lean_object* x_284; lean_object* x_285; lean_object* x_286; lean_object* x_287; lean_object* x_288; lean_object* x_289; lean_object* x_300; lean_object* x_301; 
lean_inc(x_280);
lean_inc(x_279);
lean_inc(x_278);
lean_inc(x_277);
lean_free_object(x_5);
if (lean_is_exclusive(x_142)) {
 lean_ctor_release(x_142, 0);
 lean_ctor_release(x_142, 1);
 lean_ctor_release(x_142, 2);
 lean_ctor_release(x_142, 3);
 lean_ctor_release(x_142, 4);
 x_284 = x_142;
} else {
 lean_dec_ref(x_142);
 x_284 = lean_box(0);
}
x_285 = lean_nat_add(x_148, x_138);
lean_dec(x_138);
x_286 = lean_nat_add(x_285, x_262);
lean_dec(x_285);
x_300 = lean_nat_add(x_148, x_275);
if (lean_obj_tag(x_279) == 0)
{
lean_object* x_308; 
x_308 = lean_ctor_get(x_279, 0);
lean_inc(x_308);
x_301 = x_308;
goto block_307;
}
else
{
lean_object* x_309; 
x_309 = lean_unsigned_to_nat(0u);
x_301 = x_309;
goto block_307;
}
block_299:
{
lean_object* x_290; lean_object* x_291; uint8_t x_292; 
x_290 = lean_nat_add(x_287, x_289);
lean_dec(x_289);
lean_dec(x_287);
lean_inc_ref(x_259);
if (lean_is_scalar(x_284)) {
 x_291 = lean_alloc_ctor(0, 5, 0);
} else {
 x_291 = x_284;
}
lean_ctor_set(x_291, 0, x_290);
lean_ctor_set(x_291, 1, x_260);
lean_ctor_set(x_291, 2, x_261);
lean_ctor_set(x_291, 3, x_280);
lean_ctor_set(x_291, 4, x_259);
x_292 = !lean_is_exclusive(x_259);
if (x_292 == 0)
{
lean_object* x_293; lean_object* x_294; lean_object* x_295; lean_object* x_296; lean_object* x_297; 
x_293 = lean_ctor_get(x_259, 4);
lean_dec(x_293);
x_294 = lean_ctor_get(x_259, 3);
lean_dec(x_294);
x_295 = lean_ctor_get(x_259, 2);
lean_dec(x_295);
x_296 = lean_ctor_get(x_259, 1);
lean_dec(x_296);
x_297 = lean_ctor_get(x_259, 0);
lean_dec(x_297);
lean_ctor_set(x_259, 4, x_291);
lean_ctor_set(x_259, 3, x_288);
lean_ctor_set(x_259, 2, x_278);
lean_ctor_set(x_259, 1, x_277);
lean_ctor_set(x_259, 0, x_286);
return x_259;
}
else
{
lean_object* x_298; 
lean_dec(x_259);
x_298 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_298, 0, x_286);
lean_ctor_set(x_298, 1, x_277);
lean_ctor_set(x_298, 2, x_278);
lean_ctor_set(x_298, 3, x_288);
lean_ctor_set(x_298, 4, x_291);
return x_298;
}
}
block_307:
{
lean_object* x_302; lean_object* x_303; lean_object* x_304; 
x_302 = lean_nat_add(x_300, x_301);
lean_dec(x_301);
lean_dec(x_300);
if (lean_is_scalar(x_257)) {
 x_303 = lean_alloc_ctor(0, 5, 0);
} else {
 x_303 = x_257;
}
lean_ctor_set(x_303, 0, x_302);
lean_ctor_set(x_303, 1, x_139);
lean_ctor_set(x_303, 2, x_140);
lean_ctor_set(x_303, 3, x_141);
lean_ctor_set(x_303, 4, x_279);
x_304 = lean_nat_add(x_148, x_262);
if (lean_obj_tag(x_280) == 0)
{
lean_object* x_305; 
x_305 = lean_ctor_get(x_280, 0);
lean_inc(x_305);
x_287 = x_304;
x_288 = x_303;
x_289 = x_305;
goto block_299;
}
else
{
lean_object* x_306; 
x_306 = lean_unsigned_to_nat(0u);
x_287 = x_304;
x_288 = x_303;
x_289 = x_306;
goto block_299;
}
}
}
else
{
lean_object* x_310; lean_object* x_311; lean_object* x_312; lean_object* x_313; lean_object* x_314; 
x_310 = lean_nat_add(x_148, x_138);
lean_dec(x_138);
x_311 = lean_nat_add(x_310, x_262);
lean_dec(x_310);
x_312 = lean_nat_add(x_148, x_262);
x_313 = lean_nat_add(x_312, x_276);
lean_dec(x_312);
if (lean_is_scalar(x_257)) {
 x_314 = lean_alloc_ctor(0, 5, 0);
} else {
 x_314 = x_257;
}
lean_ctor_set(x_314, 0, x_313);
lean_ctor_set(x_314, 1, x_260);
lean_ctor_set(x_314, 2, x_261);
lean_ctor_set(x_314, 3, x_142);
lean_ctor_set(x_314, 4, x_259);
lean_ctor_set(x_5, 4, x_314);
lean_ctor_set(x_5, 0, x_311);
return x_5;
}
}
else
{
lean_object* x_315; lean_object* x_316; lean_object* x_317; lean_object* x_318; lean_object* x_319; lean_object* x_320; lean_object* x_321; lean_object* x_322; uint8_t x_323; 
lean_dec(x_5);
x_315 = lean_ctor_get(x_141, 0);
x_316 = lean_ctor_get(x_142, 0);
x_317 = lean_ctor_get(x_142, 1);
x_318 = lean_ctor_get(x_142, 2);
x_319 = lean_ctor_get(x_142, 3);
x_320 = lean_ctor_get(x_142, 4);
x_321 = lean_unsigned_to_nat(2u);
x_322 = lean_nat_mul(x_321, x_315);
x_323 = lean_nat_dec_lt(x_316, x_322);
lean_dec(x_322);
if (x_323 == 0)
{
lean_object* x_324; lean_object* x_325; lean_object* x_326; lean_object* x_327; lean_object* x_328; lean_object* x_329; lean_object* x_335; lean_object* x_336; 
lean_inc(x_320);
lean_inc(x_319);
lean_inc(x_318);
lean_inc(x_317);
if (lean_is_exclusive(x_142)) {
 lean_ctor_release(x_142, 0);
 lean_ctor_release(x_142, 1);
 lean_ctor_release(x_142, 2);
 lean_ctor_release(x_142, 3);
 lean_ctor_release(x_142, 4);
 x_324 = x_142;
} else {
 lean_dec_ref(x_142);
 x_324 = lean_box(0);
}
x_325 = lean_nat_add(x_148, x_138);
lean_dec(x_138);
x_326 = lean_nat_add(x_325, x_262);
lean_dec(x_325);
x_335 = lean_nat_add(x_148, x_315);
if (lean_obj_tag(x_319) == 0)
{
lean_object* x_343; 
x_343 = lean_ctor_get(x_319, 0);
lean_inc(x_343);
x_336 = x_343;
goto block_342;
}
else
{
lean_object* x_344; 
x_344 = lean_unsigned_to_nat(0u);
x_336 = x_344;
goto block_342;
}
block_334:
{
lean_object* x_330; lean_object* x_331; lean_object* x_332; lean_object* x_333; 
x_330 = lean_nat_add(x_327, x_329);
lean_dec(x_329);
lean_dec(x_327);
lean_inc_ref(x_259);
if (lean_is_scalar(x_324)) {
 x_331 = lean_alloc_ctor(0, 5, 0);
} else {
 x_331 = x_324;
}
lean_ctor_set(x_331, 0, x_330);
lean_ctor_set(x_331, 1, x_260);
lean_ctor_set(x_331, 2, x_261);
lean_ctor_set(x_331, 3, x_320);
lean_ctor_set(x_331, 4, x_259);
if (lean_is_exclusive(x_259)) {
 lean_ctor_release(x_259, 0);
 lean_ctor_release(x_259, 1);
 lean_ctor_release(x_259, 2);
 lean_ctor_release(x_259, 3);
 lean_ctor_release(x_259, 4);
 x_332 = x_259;
} else {
 lean_dec_ref(x_259);
 x_332 = lean_box(0);
}
if (lean_is_scalar(x_332)) {
 x_333 = lean_alloc_ctor(0, 5, 0);
} else {
 x_333 = x_332;
}
lean_ctor_set(x_333, 0, x_326);
lean_ctor_set(x_333, 1, x_317);
lean_ctor_set(x_333, 2, x_318);
lean_ctor_set(x_333, 3, x_328);
lean_ctor_set(x_333, 4, x_331);
return x_333;
}
block_342:
{
lean_object* x_337; lean_object* x_338; lean_object* x_339; 
x_337 = lean_nat_add(x_335, x_336);
lean_dec(x_336);
lean_dec(x_335);
if (lean_is_scalar(x_257)) {
 x_338 = lean_alloc_ctor(0, 5, 0);
} else {
 x_338 = x_257;
}
lean_ctor_set(x_338, 0, x_337);
lean_ctor_set(x_338, 1, x_139);
lean_ctor_set(x_338, 2, x_140);
lean_ctor_set(x_338, 3, x_141);
lean_ctor_set(x_338, 4, x_319);
x_339 = lean_nat_add(x_148, x_262);
if (lean_obj_tag(x_320) == 0)
{
lean_object* x_340; 
x_340 = lean_ctor_get(x_320, 0);
lean_inc(x_340);
x_327 = x_339;
x_328 = x_338;
x_329 = x_340;
goto block_334;
}
else
{
lean_object* x_341; 
x_341 = lean_unsigned_to_nat(0u);
x_327 = x_339;
x_328 = x_338;
x_329 = x_341;
goto block_334;
}
}
}
else
{
lean_object* x_345; lean_object* x_346; lean_object* x_347; lean_object* x_348; lean_object* x_349; lean_object* x_350; 
x_345 = lean_nat_add(x_148, x_138);
lean_dec(x_138);
x_346 = lean_nat_add(x_345, x_262);
lean_dec(x_345);
x_347 = lean_nat_add(x_148, x_262);
x_348 = lean_nat_add(x_347, x_316);
lean_dec(x_347);
if (lean_is_scalar(x_257)) {
 x_349 = lean_alloc_ctor(0, 5, 0);
} else {
 x_349 = x_257;
}
lean_ctor_set(x_349, 0, x_348);
lean_ctor_set(x_349, 1, x_260);
lean_ctor_set(x_349, 2, x_261);
lean_ctor_set(x_349, 3, x_142);
lean_ctor_set(x_349, 4, x_259);
x_350 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_350, 0, x_346);
lean_ctor_set(x_350, 1, x_139);
lean_ctor_set(x_350, 2, x_140);
lean_ctor_set(x_350, 3, x_141);
lean_ctor_set(x_350, 4, x_349);
return x_350;
}
}
}
}
else
{
if (lean_obj_tag(x_141) == 0)
{
uint8_t x_351; 
lean_inc_ref(x_141);
lean_inc(x_140);
lean_inc(x_139);
lean_inc(x_138);
x_351 = !lean_is_exclusive(x_5);
if (x_351 == 0)
{
lean_object* x_352; lean_object* x_353; lean_object* x_354; lean_object* x_355; lean_object* x_356; 
x_352 = lean_ctor_get(x_5, 4);
lean_dec(x_352);
x_353 = lean_ctor_get(x_5, 3);
lean_dec(x_353);
x_354 = lean_ctor_get(x_5, 2);
lean_dec(x_354);
x_355 = lean_ctor_get(x_5, 1);
lean_dec(x_355);
x_356 = lean_ctor_get(x_5, 0);
lean_dec(x_356);
if (lean_obj_tag(x_142) == 0)
{
lean_object* x_357; lean_object* x_358; lean_object* x_359; lean_object* x_360; lean_object* x_361; lean_object* x_362; 
x_357 = lean_ctor_get(x_258, 0);
lean_inc(x_357);
x_358 = lean_ctor_get(x_258, 1);
lean_inc(x_358);
lean_dec_ref(x_258);
x_359 = lean_ctor_get(x_142, 0);
x_360 = lean_nat_add(x_148, x_138);
lean_dec(x_138);
x_361 = lean_nat_add(x_148, x_359);
if (lean_is_scalar(x_257)) {
 x_362 = lean_alloc_ctor(0, 5, 0);
} else {
 x_362 = x_257;
}
lean_ctor_set(x_362, 0, x_361);
lean_ctor_set(x_362, 1, x_357);
lean_ctor_set(x_362, 2, x_358);
lean_ctor_set(x_362, 3, x_142);
lean_ctor_set(x_362, 4, x_259);
lean_ctor_set(x_5, 4, x_362);
lean_ctor_set(x_5, 0, x_360);
return x_5;
}
else
{
lean_object* x_363; lean_object* x_364; lean_object* x_365; lean_object* x_366; 
lean_dec(x_138);
x_363 = lean_ctor_get(x_258, 0);
lean_inc(x_363);
x_364 = lean_ctor_get(x_258, 1);
lean_inc(x_364);
lean_dec_ref(x_258);
x_365 = lean_unsigned_to_nat(3u);
if (lean_is_scalar(x_257)) {
 x_366 = lean_alloc_ctor(0, 5, 0);
} else {
 x_366 = x_257;
}
lean_ctor_set(x_366, 0, x_148);
lean_ctor_set(x_366, 1, x_363);
lean_ctor_set(x_366, 2, x_364);
lean_ctor_set(x_366, 3, x_142);
lean_ctor_set(x_366, 4, x_142);
lean_ctor_set(x_5, 4, x_366);
lean_ctor_set(x_5, 0, x_365);
return x_5;
}
}
else
{
lean_dec(x_5);
if (lean_obj_tag(x_142) == 0)
{
lean_object* x_367; lean_object* x_368; lean_object* x_369; lean_object* x_370; lean_object* x_371; lean_object* x_372; lean_object* x_373; 
x_367 = lean_ctor_get(x_258, 0);
lean_inc(x_367);
x_368 = lean_ctor_get(x_258, 1);
lean_inc(x_368);
lean_dec_ref(x_258);
x_369 = lean_ctor_get(x_142, 0);
x_370 = lean_nat_add(x_148, x_138);
lean_dec(x_138);
x_371 = lean_nat_add(x_148, x_369);
if (lean_is_scalar(x_257)) {
 x_372 = lean_alloc_ctor(0, 5, 0);
} else {
 x_372 = x_257;
}
lean_ctor_set(x_372, 0, x_371);
lean_ctor_set(x_372, 1, x_367);
lean_ctor_set(x_372, 2, x_368);
lean_ctor_set(x_372, 3, x_142);
lean_ctor_set(x_372, 4, x_259);
x_373 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_373, 0, x_370);
lean_ctor_set(x_373, 1, x_139);
lean_ctor_set(x_373, 2, x_140);
lean_ctor_set(x_373, 3, x_141);
lean_ctor_set(x_373, 4, x_372);
return x_373;
}
else
{
lean_object* x_374; lean_object* x_375; lean_object* x_376; lean_object* x_377; lean_object* x_378; 
lean_dec(x_138);
x_374 = lean_ctor_get(x_258, 0);
lean_inc(x_374);
x_375 = lean_ctor_get(x_258, 1);
lean_inc(x_375);
lean_dec_ref(x_258);
x_376 = lean_unsigned_to_nat(3u);
if (lean_is_scalar(x_257)) {
 x_377 = lean_alloc_ctor(0, 5, 0);
} else {
 x_377 = x_257;
}
lean_ctor_set(x_377, 0, x_148);
lean_ctor_set(x_377, 1, x_374);
lean_ctor_set(x_377, 2, x_375);
lean_ctor_set(x_377, 3, x_142);
lean_ctor_set(x_377, 4, x_142);
x_378 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_378, 0, x_376);
lean_ctor_set(x_378, 1, x_139);
lean_ctor_set(x_378, 2, x_140);
lean_ctor_set(x_378, 3, x_141);
lean_ctor_set(x_378, 4, x_377);
return x_378;
}
}
}
else
{
if (lean_obj_tag(x_142) == 0)
{
uint8_t x_379; 
lean_inc(x_141);
lean_inc(x_140);
lean_inc(x_139);
x_379 = !lean_is_exclusive(x_5);
if (x_379 == 0)
{
lean_object* x_380; lean_object* x_381; lean_object* x_382; lean_object* x_383; lean_object* x_384; lean_object* x_385; lean_object* x_386; uint8_t x_387; 
x_380 = lean_ctor_get(x_5, 4);
lean_dec(x_380);
x_381 = lean_ctor_get(x_5, 3);
lean_dec(x_381);
x_382 = lean_ctor_get(x_5, 2);
lean_dec(x_382);
x_383 = lean_ctor_get(x_5, 1);
lean_dec(x_383);
x_384 = lean_ctor_get(x_5, 0);
lean_dec(x_384);
x_385 = lean_ctor_get(x_258, 0);
lean_inc(x_385);
x_386 = lean_ctor_get(x_258, 1);
lean_inc(x_386);
lean_dec_ref(x_258);
x_387 = !lean_is_exclusive(x_142);
if (x_387 == 0)
{
lean_object* x_388; lean_object* x_389; lean_object* x_390; lean_object* x_391; lean_object* x_392; lean_object* x_393; lean_object* x_394; 
x_388 = lean_ctor_get(x_142, 1);
x_389 = lean_ctor_get(x_142, 2);
x_390 = lean_ctor_get(x_142, 4);
lean_dec(x_390);
x_391 = lean_ctor_get(x_142, 3);
lean_dec(x_391);
x_392 = lean_ctor_get(x_142, 0);
lean_dec(x_392);
x_393 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_142, 4, x_141);
lean_ctor_set(x_142, 3, x_141);
lean_ctor_set(x_142, 2, x_140);
lean_ctor_set(x_142, 1, x_139);
lean_ctor_set(x_142, 0, x_148);
if (lean_is_scalar(x_257)) {
 x_394 = lean_alloc_ctor(0, 5, 0);
} else {
 x_394 = x_257;
}
lean_ctor_set(x_394, 0, x_148);
lean_ctor_set(x_394, 1, x_385);
lean_ctor_set(x_394, 2, x_386);
lean_ctor_set(x_394, 3, x_141);
lean_ctor_set(x_394, 4, x_141);
lean_ctor_set(x_5, 4, x_394);
lean_ctor_set(x_5, 3, x_142);
lean_ctor_set(x_5, 2, x_389);
lean_ctor_set(x_5, 1, x_388);
lean_ctor_set(x_5, 0, x_393);
return x_5;
}
else
{
lean_object* x_395; lean_object* x_396; lean_object* x_397; lean_object* x_398; lean_object* x_399; 
x_395 = lean_ctor_get(x_142, 1);
x_396 = lean_ctor_get(x_142, 2);
lean_inc(x_396);
lean_inc(x_395);
lean_dec(x_142);
x_397 = lean_unsigned_to_nat(3u);
x_398 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_398, 0, x_148);
lean_ctor_set(x_398, 1, x_139);
lean_ctor_set(x_398, 2, x_140);
lean_ctor_set(x_398, 3, x_141);
lean_ctor_set(x_398, 4, x_141);
if (lean_is_scalar(x_257)) {
 x_399 = lean_alloc_ctor(0, 5, 0);
} else {
 x_399 = x_257;
}
lean_ctor_set(x_399, 0, x_148);
lean_ctor_set(x_399, 1, x_385);
lean_ctor_set(x_399, 2, x_386);
lean_ctor_set(x_399, 3, x_141);
lean_ctor_set(x_399, 4, x_141);
lean_ctor_set(x_5, 4, x_399);
lean_ctor_set(x_5, 3, x_398);
lean_ctor_set(x_5, 2, x_396);
lean_ctor_set(x_5, 1, x_395);
lean_ctor_set(x_5, 0, x_397);
return x_5;
}
}
else
{
lean_object* x_400; lean_object* x_401; lean_object* x_402; lean_object* x_403; lean_object* x_404; lean_object* x_405; lean_object* x_406; lean_object* x_407; lean_object* x_408; 
lean_dec(x_5);
x_400 = lean_ctor_get(x_258, 0);
lean_inc(x_400);
x_401 = lean_ctor_get(x_258, 1);
lean_inc(x_401);
lean_dec_ref(x_258);
x_402 = lean_ctor_get(x_142, 1);
lean_inc(x_402);
x_403 = lean_ctor_get(x_142, 2);
lean_inc(x_403);
if (lean_is_exclusive(x_142)) {
 lean_ctor_release(x_142, 0);
 lean_ctor_release(x_142, 1);
 lean_ctor_release(x_142, 2);
 lean_ctor_release(x_142, 3);
 lean_ctor_release(x_142, 4);
 x_404 = x_142;
} else {
 lean_dec_ref(x_142);
 x_404 = lean_box(0);
}
x_405 = lean_unsigned_to_nat(3u);
if (lean_is_scalar(x_404)) {
 x_406 = lean_alloc_ctor(0, 5, 0);
} else {
 x_406 = x_404;
}
lean_ctor_set(x_406, 0, x_148);
lean_ctor_set(x_406, 1, x_139);
lean_ctor_set(x_406, 2, x_140);
lean_ctor_set(x_406, 3, x_141);
lean_ctor_set(x_406, 4, x_141);
if (lean_is_scalar(x_257)) {
 x_407 = lean_alloc_ctor(0, 5, 0);
} else {
 x_407 = x_257;
}
lean_ctor_set(x_407, 0, x_148);
lean_ctor_set(x_407, 1, x_400);
lean_ctor_set(x_407, 2, x_401);
lean_ctor_set(x_407, 3, x_141);
lean_ctor_set(x_407, 4, x_141);
x_408 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_408, 0, x_405);
lean_ctor_set(x_408, 1, x_402);
lean_ctor_set(x_408, 2, x_403);
lean_ctor_set(x_408, 3, x_406);
lean_ctor_set(x_408, 4, x_407);
return x_408;
}
}
else
{
lean_object* x_409; lean_object* x_410; lean_object* x_411; lean_object* x_412; 
x_409 = lean_ctor_get(x_258, 0);
lean_inc(x_409);
x_410 = lean_ctor_get(x_258, 1);
lean_inc(x_410);
lean_dec_ref(x_258);
x_411 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_257)) {
 x_412 = lean_alloc_ctor(0, 5, 0);
} else {
 x_412 = x_257;
}
lean_ctor_set(x_412, 0, x_411);
lean_ctor_set(x_412, 1, x_409);
lean_ctor_set(x_412, 2, x_410);
lean_ctor_set(x_412, 3, x_5);
lean_ctor_set(x_412, 4, x_142);
return x_412;
}
}
}
}
}
else
{
return x_5;
}
}
else
{
return x_6;
}
}
default: 
{
lean_object* x_413; lean_object* x_414; 
x_413 = l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__0___redArg(x_1, x_6);
x_414 = lean_unsigned_to_nat(1u);
if (lean_obj_tag(x_413) == 0)
{
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_415; lean_object* x_416; lean_object* x_417; lean_object* x_418; lean_object* x_419; lean_object* x_420; lean_object* x_421; lean_object* x_422; uint8_t x_423; 
x_415 = lean_ctor_get(x_413, 0);
lean_inc(x_415);
x_416 = lean_ctor_get(x_5, 0);
x_417 = lean_ctor_get(x_5, 1);
x_418 = lean_ctor_get(x_5, 2);
x_419 = lean_ctor_get(x_5, 3);
x_420 = lean_ctor_get(x_5, 4);
lean_inc(x_420);
x_421 = lean_unsigned_to_nat(3u);
x_422 = lean_nat_mul(x_421, x_415);
x_423 = lean_nat_dec_lt(x_422, x_416);
lean_dec(x_422);
if (x_423 == 0)
{
lean_object* x_424; lean_object* x_425; lean_object* x_426; 
lean_dec(x_420);
x_424 = lean_nat_add(x_414, x_416);
x_425 = lean_nat_add(x_424, x_415);
lean_dec(x_415);
lean_dec(x_424);
if (lean_is_scalar(x_7)) {
 x_426 = lean_alloc_ctor(0, 5, 0);
} else {
 x_426 = x_7;
}
lean_ctor_set(x_426, 0, x_425);
lean_ctor_set(x_426, 1, x_3);
lean_ctor_set(x_426, 2, x_4);
lean_ctor_set(x_426, 3, x_5);
lean_ctor_set(x_426, 4, x_413);
return x_426;
}
else
{
lean_object* x_427; lean_object* x_428; lean_object* x_429; lean_object* x_430; lean_object* x_431; lean_object* x_432; lean_object* x_433; lean_object* x_434; lean_object* x_435; uint8_t x_436; 
lean_inc(x_419);
lean_inc(x_418);
lean_inc(x_417);
lean_inc(x_416);
if (lean_is_exclusive(x_5)) {
 lean_ctor_release(x_5, 0);
 lean_ctor_release(x_5, 1);
 lean_ctor_release(x_5, 2);
 lean_ctor_release(x_5, 3);
 lean_ctor_release(x_5, 4);
 x_427 = x_5;
} else {
 lean_dec_ref(x_5);
 x_427 = lean_box(0);
}
x_428 = lean_ctor_get(x_419, 0);
x_429 = lean_ctor_get(x_420, 0);
x_430 = lean_ctor_get(x_420, 1);
x_431 = lean_ctor_get(x_420, 2);
x_432 = lean_ctor_get(x_420, 3);
x_433 = lean_ctor_get(x_420, 4);
x_434 = lean_unsigned_to_nat(2u);
x_435 = lean_nat_mul(x_434, x_428);
x_436 = lean_nat_dec_lt(x_429, x_435);
lean_dec(x_435);
if (x_436 == 0)
{
lean_object* x_437; lean_object* x_438; lean_object* x_439; lean_object* x_440; lean_object* x_441; lean_object* x_442; lean_object* x_447; lean_object* x_448; 
lean_inc(x_433);
lean_inc(x_432);
lean_inc(x_431);
lean_inc(x_430);
if (lean_is_exclusive(x_420)) {
 lean_ctor_release(x_420, 0);
 lean_ctor_release(x_420, 1);
 lean_ctor_release(x_420, 2);
 lean_ctor_release(x_420, 3);
 lean_ctor_release(x_420, 4);
 x_437 = x_420;
} else {
 lean_dec_ref(x_420);
 x_437 = lean_box(0);
}
x_438 = lean_nat_add(x_414, x_416);
lean_dec(x_416);
x_439 = lean_nat_add(x_438, x_415);
lean_dec(x_438);
x_447 = lean_nat_add(x_414, x_428);
if (lean_obj_tag(x_432) == 0)
{
lean_object* x_455; 
x_455 = lean_ctor_get(x_432, 0);
lean_inc(x_455);
x_448 = x_455;
goto block_454;
}
else
{
lean_object* x_456; 
x_456 = lean_unsigned_to_nat(0u);
x_448 = x_456;
goto block_454;
}
block_446:
{
lean_object* x_443; lean_object* x_444; lean_object* x_445; 
x_443 = lean_nat_add(x_441, x_442);
lean_dec(x_442);
lean_dec(x_441);
if (lean_is_scalar(x_437)) {
 x_444 = lean_alloc_ctor(0, 5, 0);
} else {
 x_444 = x_437;
}
lean_ctor_set(x_444, 0, x_443);
lean_ctor_set(x_444, 1, x_3);
lean_ctor_set(x_444, 2, x_4);
lean_ctor_set(x_444, 3, x_433);
lean_ctor_set(x_444, 4, x_413);
if (lean_is_scalar(x_427)) {
 x_445 = lean_alloc_ctor(0, 5, 0);
} else {
 x_445 = x_427;
}
lean_ctor_set(x_445, 0, x_439);
lean_ctor_set(x_445, 1, x_430);
lean_ctor_set(x_445, 2, x_431);
lean_ctor_set(x_445, 3, x_440);
lean_ctor_set(x_445, 4, x_444);
return x_445;
}
block_454:
{
lean_object* x_449; lean_object* x_450; lean_object* x_451; 
x_449 = lean_nat_add(x_447, x_448);
lean_dec(x_448);
lean_dec(x_447);
if (lean_is_scalar(x_7)) {
 x_450 = lean_alloc_ctor(0, 5, 0);
} else {
 x_450 = x_7;
}
lean_ctor_set(x_450, 0, x_449);
lean_ctor_set(x_450, 1, x_417);
lean_ctor_set(x_450, 2, x_418);
lean_ctor_set(x_450, 3, x_419);
lean_ctor_set(x_450, 4, x_432);
x_451 = lean_nat_add(x_414, x_415);
lean_dec(x_415);
if (lean_obj_tag(x_433) == 0)
{
lean_object* x_452; 
x_452 = lean_ctor_get(x_433, 0);
lean_inc(x_452);
x_440 = x_450;
x_441 = x_451;
x_442 = x_452;
goto block_446;
}
else
{
lean_object* x_453; 
x_453 = lean_unsigned_to_nat(0u);
x_440 = x_450;
x_441 = x_451;
x_442 = x_453;
goto block_446;
}
}
}
else
{
lean_object* x_457; lean_object* x_458; lean_object* x_459; lean_object* x_460; lean_object* x_461; uint8_t x_462; 
lean_dec(x_7);
x_457 = lean_nat_add(x_414, x_416);
lean_dec(x_416);
x_458 = lean_nat_add(x_457, x_415);
lean_dec(x_457);
x_459 = lean_nat_add(x_414, x_415);
lean_dec(x_415);
x_460 = lean_nat_add(x_459, x_429);
lean_dec(x_459);
lean_inc_ref(x_413);
if (lean_is_scalar(x_427)) {
 x_461 = lean_alloc_ctor(0, 5, 0);
} else {
 x_461 = x_427;
}
lean_ctor_set(x_461, 0, x_460);
lean_ctor_set(x_461, 1, x_3);
lean_ctor_set(x_461, 2, x_4);
lean_ctor_set(x_461, 3, x_420);
lean_ctor_set(x_461, 4, x_413);
x_462 = !lean_is_exclusive(x_413);
if (x_462 == 0)
{
lean_object* x_463; lean_object* x_464; lean_object* x_465; lean_object* x_466; lean_object* x_467; 
x_463 = lean_ctor_get(x_413, 4);
lean_dec(x_463);
x_464 = lean_ctor_get(x_413, 3);
lean_dec(x_464);
x_465 = lean_ctor_get(x_413, 2);
lean_dec(x_465);
x_466 = lean_ctor_get(x_413, 1);
lean_dec(x_466);
x_467 = lean_ctor_get(x_413, 0);
lean_dec(x_467);
lean_ctor_set(x_413, 4, x_461);
lean_ctor_set(x_413, 3, x_419);
lean_ctor_set(x_413, 2, x_418);
lean_ctor_set(x_413, 1, x_417);
lean_ctor_set(x_413, 0, x_458);
return x_413;
}
else
{
lean_object* x_468; 
lean_dec(x_413);
x_468 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_468, 0, x_458);
lean_ctor_set(x_468, 1, x_417);
lean_ctor_set(x_468, 2, x_418);
lean_ctor_set(x_468, 3, x_419);
lean_ctor_set(x_468, 4, x_461);
return x_468;
}
}
}
}
else
{
lean_object* x_469; lean_object* x_470; lean_object* x_471; 
x_469 = lean_ctor_get(x_413, 0);
lean_inc(x_469);
x_470 = lean_nat_add(x_414, x_469);
lean_dec(x_469);
if (lean_is_scalar(x_7)) {
 x_471 = lean_alloc_ctor(0, 5, 0);
} else {
 x_471 = x_7;
}
lean_ctor_set(x_471, 0, x_470);
lean_ctor_set(x_471, 1, x_3);
lean_ctor_set(x_471, 2, x_4);
lean_ctor_set(x_471, 3, x_5);
lean_ctor_set(x_471, 4, x_413);
return x_471;
}
}
else
{
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_472; 
x_472 = lean_ctor_get(x_5, 3);
if (lean_obj_tag(x_472) == 0)
{
lean_object* x_473; 
lean_inc_ref(x_472);
x_473 = lean_ctor_get(x_5, 4);
lean_inc(x_473);
if (lean_obj_tag(x_473) == 0)
{
uint8_t x_474; 
x_474 = !lean_is_exclusive(x_5);
if (x_474 == 0)
{
lean_object* x_475; lean_object* x_476; lean_object* x_477; lean_object* x_478; lean_object* x_479; lean_object* x_480; lean_object* x_481; lean_object* x_482; lean_object* x_483; 
x_475 = lean_ctor_get(x_5, 0);
x_476 = lean_ctor_get(x_5, 1);
x_477 = lean_ctor_get(x_5, 2);
x_478 = lean_ctor_get(x_5, 4);
lean_dec(x_478);
x_479 = lean_ctor_get(x_5, 3);
lean_dec(x_479);
x_480 = lean_ctor_get(x_473, 0);
x_481 = lean_nat_add(x_414, x_475);
lean_dec(x_475);
x_482 = lean_nat_add(x_414, x_480);
lean_ctor_set(x_5, 4, x_413);
lean_ctor_set(x_5, 3, x_473);
lean_ctor_set(x_5, 2, x_4);
lean_ctor_set(x_5, 1, x_3);
lean_ctor_set(x_5, 0, x_482);
if (lean_is_scalar(x_7)) {
 x_483 = lean_alloc_ctor(0, 5, 0);
} else {
 x_483 = x_7;
}
lean_ctor_set(x_483, 0, x_481);
lean_ctor_set(x_483, 1, x_476);
lean_ctor_set(x_483, 2, x_477);
lean_ctor_set(x_483, 3, x_472);
lean_ctor_set(x_483, 4, x_5);
return x_483;
}
else
{
lean_object* x_484; lean_object* x_485; lean_object* x_486; lean_object* x_487; lean_object* x_488; lean_object* x_489; lean_object* x_490; lean_object* x_491; 
x_484 = lean_ctor_get(x_5, 0);
x_485 = lean_ctor_get(x_5, 1);
x_486 = lean_ctor_get(x_5, 2);
lean_inc(x_486);
lean_inc(x_485);
lean_inc(x_484);
lean_dec(x_5);
x_487 = lean_ctor_get(x_473, 0);
x_488 = lean_nat_add(x_414, x_484);
lean_dec(x_484);
x_489 = lean_nat_add(x_414, x_487);
x_490 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_490, 0, x_489);
lean_ctor_set(x_490, 1, x_3);
lean_ctor_set(x_490, 2, x_4);
lean_ctor_set(x_490, 3, x_473);
lean_ctor_set(x_490, 4, x_413);
if (lean_is_scalar(x_7)) {
 x_491 = lean_alloc_ctor(0, 5, 0);
} else {
 x_491 = x_7;
}
lean_ctor_set(x_491, 0, x_488);
lean_ctor_set(x_491, 1, x_485);
lean_ctor_set(x_491, 2, x_486);
lean_ctor_set(x_491, 3, x_472);
lean_ctor_set(x_491, 4, x_490);
return x_491;
}
}
else
{
uint8_t x_492; 
x_492 = !lean_is_exclusive(x_5);
if (x_492 == 0)
{
lean_object* x_493; lean_object* x_494; lean_object* x_495; lean_object* x_496; lean_object* x_497; lean_object* x_498; lean_object* x_499; 
x_493 = lean_ctor_get(x_5, 1);
x_494 = lean_ctor_get(x_5, 2);
x_495 = lean_ctor_get(x_5, 4);
lean_dec(x_495);
x_496 = lean_ctor_get(x_5, 3);
lean_dec(x_496);
x_497 = lean_ctor_get(x_5, 0);
lean_dec(x_497);
x_498 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_5, 3, x_473);
lean_ctor_set(x_5, 2, x_4);
lean_ctor_set(x_5, 1, x_3);
lean_ctor_set(x_5, 0, x_414);
if (lean_is_scalar(x_7)) {
 x_499 = lean_alloc_ctor(0, 5, 0);
} else {
 x_499 = x_7;
}
lean_ctor_set(x_499, 0, x_498);
lean_ctor_set(x_499, 1, x_493);
lean_ctor_set(x_499, 2, x_494);
lean_ctor_set(x_499, 3, x_472);
lean_ctor_set(x_499, 4, x_5);
return x_499;
}
else
{
lean_object* x_500; lean_object* x_501; lean_object* x_502; lean_object* x_503; lean_object* x_504; 
x_500 = lean_ctor_get(x_5, 1);
x_501 = lean_ctor_get(x_5, 2);
lean_inc(x_501);
lean_inc(x_500);
lean_dec(x_5);
x_502 = lean_unsigned_to_nat(3u);
x_503 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_503, 0, x_414);
lean_ctor_set(x_503, 1, x_3);
lean_ctor_set(x_503, 2, x_4);
lean_ctor_set(x_503, 3, x_473);
lean_ctor_set(x_503, 4, x_473);
if (lean_is_scalar(x_7)) {
 x_504 = lean_alloc_ctor(0, 5, 0);
} else {
 x_504 = x_7;
}
lean_ctor_set(x_504, 0, x_502);
lean_ctor_set(x_504, 1, x_500);
lean_ctor_set(x_504, 2, x_501);
lean_ctor_set(x_504, 3, x_472);
lean_ctor_set(x_504, 4, x_503);
return x_504;
}
}
}
else
{
lean_object* x_505; 
x_505 = lean_ctor_get(x_5, 4);
lean_inc(x_505);
if (lean_obj_tag(x_505) == 0)
{
uint8_t x_506; 
lean_inc(x_472);
x_506 = !lean_is_exclusive(x_5);
if (x_506 == 0)
{
lean_object* x_507; lean_object* x_508; lean_object* x_509; lean_object* x_510; lean_object* x_511; uint8_t x_512; 
x_507 = lean_ctor_get(x_5, 1);
x_508 = lean_ctor_get(x_5, 2);
x_509 = lean_ctor_get(x_5, 4);
lean_dec(x_509);
x_510 = lean_ctor_get(x_5, 3);
lean_dec(x_510);
x_511 = lean_ctor_get(x_5, 0);
lean_dec(x_511);
x_512 = !lean_is_exclusive(x_505);
if (x_512 == 0)
{
lean_object* x_513; lean_object* x_514; lean_object* x_515; lean_object* x_516; lean_object* x_517; lean_object* x_518; lean_object* x_519; 
x_513 = lean_ctor_get(x_505, 1);
x_514 = lean_ctor_get(x_505, 2);
x_515 = lean_ctor_get(x_505, 4);
lean_dec(x_515);
x_516 = lean_ctor_get(x_505, 3);
lean_dec(x_516);
x_517 = lean_ctor_get(x_505, 0);
lean_dec(x_517);
x_518 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_505, 4, x_472);
lean_ctor_set(x_505, 3, x_472);
lean_ctor_set(x_505, 2, x_508);
lean_ctor_set(x_505, 1, x_507);
lean_ctor_set(x_505, 0, x_414);
lean_ctor_set(x_5, 4, x_472);
lean_ctor_set(x_5, 2, x_4);
lean_ctor_set(x_5, 1, x_3);
lean_ctor_set(x_5, 0, x_414);
if (lean_is_scalar(x_7)) {
 x_519 = lean_alloc_ctor(0, 5, 0);
} else {
 x_519 = x_7;
}
lean_ctor_set(x_519, 0, x_518);
lean_ctor_set(x_519, 1, x_513);
lean_ctor_set(x_519, 2, x_514);
lean_ctor_set(x_519, 3, x_505);
lean_ctor_set(x_519, 4, x_5);
return x_519;
}
else
{
lean_object* x_520; lean_object* x_521; lean_object* x_522; lean_object* x_523; lean_object* x_524; 
x_520 = lean_ctor_get(x_505, 1);
x_521 = lean_ctor_get(x_505, 2);
lean_inc(x_521);
lean_inc(x_520);
lean_dec(x_505);
x_522 = lean_unsigned_to_nat(3u);
x_523 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_523, 0, x_414);
lean_ctor_set(x_523, 1, x_507);
lean_ctor_set(x_523, 2, x_508);
lean_ctor_set(x_523, 3, x_472);
lean_ctor_set(x_523, 4, x_472);
lean_ctor_set(x_5, 4, x_472);
lean_ctor_set(x_5, 2, x_4);
lean_ctor_set(x_5, 1, x_3);
lean_ctor_set(x_5, 0, x_414);
if (lean_is_scalar(x_7)) {
 x_524 = lean_alloc_ctor(0, 5, 0);
} else {
 x_524 = x_7;
}
lean_ctor_set(x_524, 0, x_522);
lean_ctor_set(x_524, 1, x_520);
lean_ctor_set(x_524, 2, x_521);
lean_ctor_set(x_524, 3, x_523);
lean_ctor_set(x_524, 4, x_5);
return x_524;
}
}
else
{
lean_object* x_525; lean_object* x_526; lean_object* x_527; lean_object* x_528; lean_object* x_529; lean_object* x_530; lean_object* x_531; lean_object* x_532; lean_object* x_533; 
x_525 = lean_ctor_get(x_5, 1);
x_526 = lean_ctor_get(x_5, 2);
lean_inc(x_526);
lean_inc(x_525);
lean_dec(x_5);
x_527 = lean_ctor_get(x_505, 1);
lean_inc(x_527);
x_528 = lean_ctor_get(x_505, 2);
lean_inc(x_528);
if (lean_is_exclusive(x_505)) {
 lean_ctor_release(x_505, 0);
 lean_ctor_release(x_505, 1);
 lean_ctor_release(x_505, 2);
 lean_ctor_release(x_505, 3);
 lean_ctor_release(x_505, 4);
 x_529 = x_505;
} else {
 lean_dec_ref(x_505);
 x_529 = lean_box(0);
}
x_530 = lean_unsigned_to_nat(3u);
if (lean_is_scalar(x_529)) {
 x_531 = lean_alloc_ctor(0, 5, 0);
} else {
 x_531 = x_529;
}
lean_ctor_set(x_531, 0, x_414);
lean_ctor_set(x_531, 1, x_525);
lean_ctor_set(x_531, 2, x_526);
lean_ctor_set(x_531, 3, x_472);
lean_ctor_set(x_531, 4, x_472);
x_532 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_532, 0, x_414);
lean_ctor_set(x_532, 1, x_3);
lean_ctor_set(x_532, 2, x_4);
lean_ctor_set(x_532, 3, x_472);
lean_ctor_set(x_532, 4, x_472);
if (lean_is_scalar(x_7)) {
 x_533 = lean_alloc_ctor(0, 5, 0);
} else {
 x_533 = x_7;
}
lean_ctor_set(x_533, 0, x_530);
lean_ctor_set(x_533, 1, x_527);
lean_ctor_set(x_533, 2, x_528);
lean_ctor_set(x_533, 3, x_531);
lean_ctor_set(x_533, 4, x_532);
return x_533;
}
}
else
{
lean_object* x_534; lean_object* x_535; 
x_534 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_7)) {
 x_535 = lean_alloc_ctor(0, 5, 0);
} else {
 x_535 = x_7;
}
lean_ctor_set(x_535, 0, x_534);
lean_ctor_set(x_535, 1, x_3);
lean_ctor_set(x_535, 2, x_4);
lean_ctor_set(x_535, 3, x_5);
lean_ctor_set(x_535, 4, x_505);
return x_535;
}
}
}
else
{
lean_object* x_536; 
if (lean_is_scalar(x_7)) {
 x_536 = lean_alloc_ctor(0, 5, 0);
} else {
 x_536 = x_7;
}
lean_ctor_set(x_536, 0, x_414);
lean_ctor_set(x_536, 1, x_3);
lean_ctor_set(x_536, 2, x_4);
lean_ctor_set(x_536, 3, x_5);
lean_ctor_set(x_536, 4, x_5);
return x_536;
}
}
}
}
}
else
{
lean_dec(x_1);
return x_2;
}
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__0___redArg(x_2, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 
x_5 = lean_ctor_get(x_1, 5);
x_6 = lean_st_ref_take(x_5);
lean_inc(x_6);
lean_inc(x_2);
x_7 = l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__0___redArg(x_2, x_6);
x_8 = lean_st_ref_set(x_5, x_7);
x_9 = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__1___redArg(x_6, x_2);
if (lean_obj_tag(x_9) == 1)
{
lean_object* x_10; lean_object* x_11; 
x_10 = lean_ctor_get(x_9, 0);
lean_inc(x_10);
lean_dec_ref(x_9);
x_11 = lean_io_promise_resolve(x_3, x_10);
lean_dec(x_10);
return x_11;
}
else
{
lean_object* x_12; 
lean_dec(x_9);
lean_dec_ref(x_3);
x_12 = lean_box(0);
return x_12;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse(x_1, x_2, x_3);
lean_dec_ref(x_1);
return x_5;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoNotification(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; lean_object* x_6; uint8_t x_7; uint8_t x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; 
x_5 = lean_ctor_get(x_2, 2);
lean_inc(x_5);
x_6 = lean_ctor_get(x_2, 3);
lean_inc_ref(x_6);
lean_dec_ref(x_2);
x_7 = 1;
x_8 = 0;
x_9 = l_Lean_Server_findModuleRefs(x_6, x_3, x_7, x_8);
x_10 = l_Lean_Server_ModuleRefs_toLspModuleRefs(x_9);
x_11 = !lean_is_exclusive(x_10);
if (x_11 == 0)
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; 
x_12 = lean_ctor_get(x_10, 0);
x_13 = lean_ctor_get(x_10, 1);
x_14 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_14, 0, x_5);
lean_ctor_set(x_14, 1, x_12);
lean_ctor_set(x_14, 2, x_13);
lean_ctor_set(x_10, 1, x_14);
lean_ctor_set(x_10, 0, x_1);
return x_10;
}
else
{
lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; 
x_15 = lean_ctor_get(x_10, 0);
x_16 = lean_ctor_get(x_10, 1);
lean_inc(x_16);
lean_inc(x_15);
lean_dec(x_10);
x_17 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_17, 0, x_5);
lean_ctor_set(x_17, 1, x_15);
lean_ctor_set(x_17, 2, x_16);
x_18 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_18, 0, x_1);
lean_ctor_set(x_18, 1, x_17);
return x_18;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoNotification___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoNotification(x_1, x_2, x_3);
lean_dec_ref(x_3);
return x_5;
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderInfoNotification___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("$/lean/ileanHeaderInfo", 22, 22);
return x_1;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderInfoNotification(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_3 = lean_ctor_get(x_1, 2);
x_4 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderInfoNotification___closed__0;
lean_inc(x_3);
x_5 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_5, 0, x_3);
lean_ctor_set(x_5, 1, x_2);
x_6 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_6, 0, x_4);
lean_ctor_set(x_6, 1, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderInfoNotification___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderInfoNotification(x_1, x_2);
lean_dec_ref(x_1);
return x_3;
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderSetupInfoNotification___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("$/lean/ileanHeaderSetupInfo", 27, 27);
return x_1;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderSetupInfoNotification(lean_object* x_1, uint8_t x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_3 = lean_ctor_get(x_1, 2);
x_4 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderSetupInfoNotification___closed__0;
lean_inc(x_3);
x_5 = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(x_5, 0, x_3);
lean_ctor_set_uint8(x_5, sizeof(void*)*1, x_2);
x_6 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_6, 0, x_4);
lean_ctor_set(x_6, 1, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderSetupInfoNotification___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; lean_object* x_4; 
x_3 = lean_unbox(x_2);
x_4 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderSetupInfoNotification(x_1, x_3);
lean_dec_ref(x_1);
return x_4;
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoUpdateNotification___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("$/lean/ileanInfoUpdate", 22, 22);
return x_1;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoUpdateNotification(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; lean_object* x_5; 
x_4 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoUpdateNotification___closed__0;
x_5 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoNotification(x_4, x_1, x_2);
return x_5;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoUpdateNotification___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoUpdateNotification(x_1, x_2);
lean_dec_ref(x_2);
return x_4;
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoFinalNotification___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("$/lean/ileanInfoFinal", 21, 21);
return x_1;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoFinalNotification(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; lean_object* x_5; 
x_4 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoFinalNotification___closed__0;
x_5 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoNotification(x_4, x_1, x_2);
return x_5;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoFinalNotification___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoFinalNotification(x_1, x_2);
lean_dec_ref(x_2);
return x_4;
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkImportClosureNotification___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("$/lean/importClosure", 20, 20);
return x_1;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkImportClosureNotification(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; 
x_2 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkImportClosureNotification___closed__0;
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = l_Array_empty(lean_box(0));
return x_1;
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default___closed__1() {
_start:
{
lean_object* x_1; uint8_t x_2; lean_object* x_3; 
x_1 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default___closed__0;
x_2 = 0;
x_3 = lean_alloc_ctor(0, 2, 2);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_1);
lean_ctor_set_uint8(x_3, sizeof(void*)*2, x_2);
lean_ctor_set_uint8(x_3, sizeof(void*)*2 + 1, x_2);
return x_3;
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default() {
_start:
{
lean_object* x_1; 
x_1 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default___closed__1;
return x_1;
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState() {
_start:
{
lean_object* x_1; 
x_1 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default;
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Option_register___at___00Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4__spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_5; 
x_5 = !lean_is_exclusive(x_2);
if (x_5 == 0)
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
x_6 = lean_ctor_get(x_2, 0);
x_7 = lean_ctor_get(x_2, 1);
lean_inc(x_6);
x_8 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_8, 0, x_6);
lean_inc(x_1);
x_9 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_9, 0, x_1);
lean_ctor_set(x_9, 1, x_3);
lean_ctor_set(x_9, 2, x_8);
lean_ctor_set(x_9, 3, x_7);
lean_inc(x_1);
x_10 = lean_register_option(x_1, x_9);
if (lean_obj_tag(x_10) == 0)
{
uint8_t x_11; 
x_11 = !lean_is_exclusive(x_10);
if (x_11 == 0)
{
lean_object* x_12; 
x_12 = lean_ctor_get(x_10, 0);
lean_dec(x_12);
lean_ctor_set(x_2, 1, x_6);
lean_ctor_set(x_2, 0, x_1);
lean_ctor_set(x_10, 0, x_2);
return x_10;
}
else
{
lean_object* x_13; 
lean_dec(x_10);
lean_ctor_set(x_2, 1, x_6);
lean_ctor_set(x_2, 0, x_1);
x_13 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_13, 0, x_2);
return x_13;
}
}
else
{
uint8_t x_14; 
lean_free_object(x_2);
lean_dec(x_6);
lean_dec(x_1);
x_14 = !lean_is_exclusive(x_10);
if (x_14 == 0)
{
return x_10;
}
else
{
lean_object* x_15; lean_object* x_16; 
x_15 = lean_ctor_get(x_10, 0);
lean_inc(x_15);
lean_dec(x_10);
x_16 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_16, 0, x_15);
return x_16;
}
}
}
else
{
lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; 
x_17 = lean_ctor_get(x_2, 0);
x_18 = lean_ctor_get(x_2, 1);
lean_inc(x_18);
lean_inc(x_17);
lean_dec(x_2);
lean_inc(x_17);
x_19 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_19, 0, x_17);
lean_inc(x_1);
x_20 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_20, 0, x_1);
lean_ctor_set(x_20, 1, x_3);
lean_ctor_set(x_20, 2, x_19);
lean_ctor_set(x_20, 3, x_18);
lean_inc(x_1);
x_21 = lean_register_option(x_1, x_20);
if (lean_obj_tag(x_21) == 0)
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; 
if (lean_is_exclusive(x_21)) {
 lean_ctor_release(x_21, 0);
 x_22 = x_21;
} else {
 lean_dec_ref(x_21);
 x_22 = lean_box(0);
}
x_23 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_23, 0, x_1);
lean_ctor_set(x_23, 1, x_17);
if (lean_is_scalar(x_22)) {
 x_24 = lean_alloc_ctor(0, 1, 0);
} else {
 x_24 = x_22;
}
lean_ctor_set(x_24, 0, x_23);
return x_24;
}
else
{
lean_object* x_25; lean_object* x_26; lean_object* x_27; 
lean_dec(x_17);
lean_dec(x_1);
x_25 = lean_ctor_get(x_21, 0);
lean_inc(x_25);
if (lean_is_exclusive(x_21)) {
 lean_ctor_release(x_21, 0);
 x_26 = x_21;
} else {
 lean_dec_ref(x_21);
 x_26 = lean_box(0);
}
if (lean_is_scalar(x_26)) {
 x_27 = lean_alloc_ctor(1, 1, 0);
} else {
 x_27 = x_26;
}
lean_ctor_set(x_27, 0, x_25);
return x_27;
}
}
}
}
static lean_object* _init_l_Lean_Server_FileWorker_initFn___closed__0_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("server", 6, 6);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_initFn___closed__1_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("reportDelayMs", 13, 13);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_initFn___closed__2_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lean_Server_FileWorker_initFn___closed__1_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_2 = l_Lean_Server_FileWorker_initFn___closed__0_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_3 = l_Lean_Name_mkStr2(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_initFn___closed__3_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("(server) time in milliseconds to wait before reporting progress and diagnostics on document edit in order to reduce flickering\n\nThis option can only be set on the command line, not in the lakefile or via `set_option`.", 217, 217);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_initFn___closed__4_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lean_Server_FileWorker_initFn___closed__3_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_2 = lean_unsigned_to_nat(200u);
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_initFn___closed__5_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Lean", 4, 4);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_initFn___closed__6_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Server", 6, 6);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_initFn___closed__7_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("FileWorker", 10, 10);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_initFn___closed__8_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_1 = l_Lean_Server_FileWorker_initFn___closed__1_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_2 = l_Lean_Server_FileWorker_initFn___closed__0_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_3 = l_Lean_Server_FileWorker_initFn___closed__7_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_4 = l_Lean_Server_FileWorker_initFn___closed__6_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_5 = l_Lean_Server_FileWorker_initFn___closed__5_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_6 = l_Lean_Name_mkStr5(x_5, x_4, x_3, x_2, x_1);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_() {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; 
x_2 = l_Lean_Server_FileWorker_initFn___closed__2_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_3 = l_Lean_Server_FileWorker_initFn___closed__4_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_4 = l_Lean_Server_FileWorker_initFn___closed__8_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_5 = l_Lean_Option_register___at___00Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4__spec__0(x_2, x_3, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Option_register___at___00Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4__spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Option_register___at___00Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4__spec__0(x_1, x_2, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4____boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_();
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_instImpl___closed__0_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("MemorizedInteractiveDiagnostics", 31, 31);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_instImpl___closed__1_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; 
x_1 = l_Lean_Server_FileWorker_instImpl___closed__0_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_;
x_2 = l_Lean_Server_FileWorker_initFn___closed__7_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_3 = l_Lean_Server_FileWorker_initFn___closed__6_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_4 = l_Lean_Server_FileWorker_initFn___closed__5_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_5 = l_Lean_Name_mkStr4(x_4, x_3, x_2, x_1);
return x_5;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_instImpl_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_() {
_start:
{
lean_object* x_1; 
x_1 = l_Lean_Server_FileWorker_instImpl___closed__1_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_;
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_instTypeNameMemorizedInteractiveDiagnostics() {
_start:
{
lean_object* x_1; 
x_1 = l_Lean_Server_FileWorker_instImpl_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_;
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_toStructured_x3f___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics_spec__1(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; 
x_2 = l_Lean_Lsp_instToJsonPublishDiagnosticsParams_toJson(x_1);
x_3 = l_Lean_Json_Structured_fromJson_x3f(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics_spec__0(size_t x_1, size_t x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; 
x_4 = lean_usize_dec_lt(x_2, x_1);
if (x_4 == 0)
{
return x_3;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; size_t x_9; size_t x_10; lean_object* x_11; 
x_5 = lean_array_uget(x_3, x_2);
x_6 = lean_unsigned_to_nat(0u);
x_7 = lean_array_uset(x_3, x_2, x_6);
x_8 = l_Lean_Widget_InteractiveDiagnostic_toDiagnostic(x_5);
x_9 = 1;
x_10 = lean_usize_add(x_2, x_9);
x_11 = lean_array_uset(x_7, x_2, x_8);
x_2 = x_10;
x_3 = x_11;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; size_t x_11; size_t x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_23; 
x_4 = lean_ctor_get(x_1, 0);
lean_inc_ref(x_4);
x_5 = lean_ctor_get(x_1, 3);
lean_inc(x_5);
lean_dec_ref(x_1);
x_6 = lean_st_ref_get(x_5);
lean_dec(x_5);
x_7 = lean_ctor_get(x_2, 0);
lean_inc_ref(x_7);
x_8 = lean_ctor_get(x_2, 3);
lean_inc(x_8);
lean_dec_ref(x_2);
x_9 = lean_st_ref_get(x_8);
lean_dec(x_8);
x_10 = l_Array_append___redArg(x_6, x_9);
lean_dec(x_9);
x_11 = lean_array_size(x_10);
x_12 = 0;
x_13 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics_spec__0(x_11, x_12, x_10);
x_14 = l_Lean_Server_mkPublishDiagnosticsNotification(x_7, x_13);
x_15 = lean_ctor_get(x_14, 0);
lean_inc_ref(x_15);
x_16 = lean_ctor_get(x_14, 1);
lean_inc(x_16);
if (lean_is_exclusive(x_14)) {
 lean_ctor_release(x_14, 0);
 lean_ctor_release(x_14, 1);
 x_17 = x_14;
} else {
 lean_dec_ref(x_14);
 x_17 = lean_box(0);
}
x_23 = l_Lean_Json_toStructured_x3f___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics_spec__1(x_16);
if (lean_obj_tag(x_23) == 0)
{
lean_object* x_24; 
lean_dec_ref(x_23);
x_24 = lean_box(0);
x_18 = x_24;
goto block_22;
}
else
{
uint8_t x_25; 
x_25 = !lean_is_exclusive(x_23);
if (x_25 == 0)
{
x_18 = x_23;
goto block_22;
}
else
{
lean_object* x_26; lean_object* x_27; 
x_26 = lean_ctor_get(x_23, 0);
lean_inc(x_26);
lean_dec(x_23);
x_27 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_27, 0, x_26);
x_18 = x_27;
goto block_22;
}
}
block_22:
{
lean_object* x_19; lean_object* x_20; lean_object* x_21; 
if (lean_is_scalar(x_17)) {
 x_19 = lean_alloc_ctor(1, 2, 0);
} else {
 x_19 = x_17;
 lean_ctor_set_tag(x_19, 1);
}
lean_ctor_set(x_19, 0, x_15);
lean_ctor_set(x_19, 1, x_18);
x_20 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_19);
x_21 = l_Std_Channel_Sync_send___redArg(x_4, x_20);
return x_21;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
size_t x_4; size_t x_5; lean_object* x_6; 
x_4 = lean_unbox_usize(x_1);
lean_dec(x_1);
x_5 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_6 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics_spec__0(x_4, x_5, x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics(x_1, x_2);
return x_4;
}
}
LEAN_EXPORT uint8_t l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6___redArg___lam__0(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; uint8_t x_5; 
x_3 = lean_ctor_get(x_1, 0);
x_4 = lean_ctor_get(x_2, 0);
x_5 = lean_nat_dec_lt(x_3, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6___redArg___lam__0___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; lean_object* x_4; 
x_3 = l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6___redArg___lam__0(x_1, x_2);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_4 = lean_box(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; 
x_4 = lean_nat_dec_lt(x_2, x_3);
if (x_4 == 0)
{
lean_dec(x_2);
return x_1;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; 
x_5 = lean_alloc_closure((void*)(l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6___redArg___lam__0___boxed), 2, 0);
lean_inc(x_2);
x_6 = l_Array_qpartition___redArg(x_1, x_5, x_2, x_3);
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
x_8 = lean_ctor_get(x_6, 1);
lean_inc(x_8);
lean_dec_ref(x_6);
x_9 = lean_nat_dec_le(x_3, x_7);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_10 = l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6___redArg(x_8, x_2, x_7);
x_11 = lean_unsigned_to_nat(1u);
x_12 = lean_nat_add(x_7, x_11);
lean_dec(x_7);
x_1 = x_10;
x_2 = x_12;
goto _start;
}
else
{
lean_dec(x_7);
lean_dec(x_2);
return x_8;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6___redArg(x_2, x_3, x_4);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_toStructured_x3f___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__2(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; 
x_2 = l_Lean_Lsp_instToJsonLeanFileProgressParams_toJson(x_1);
x_3 = l_Lean_Json_Structured_fromJson_x3f(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__1(size_t x_1, size_t x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; 
x_4 = lean_usize_dec_lt(x_2, x_1);
if (x_4 == 0)
{
return x_3;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; lean_object* x_9; size_t x_10; size_t x_11; lean_object* x_12; 
x_5 = lean_array_uget(x_3, x_2);
x_6 = lean_unsigned_to_nat(0u);
x_7 = lean_array_uset(x_3, x_2, x_6);
x_8 = 0;
x_9 = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(x_9, 0, x_5);
lean_ctor_set_uint8(x_9, sizeof(void*)*1, x_8);
x_10 = 1;
x_11 = lean_usize_add(x_2, x_10);
x_12 = lean_array_uset(x_7, x_2, x_9);
x_2 = x_11;
x_3 = x_12;
goto _start;
}
}
}
static lean_object* _init_l_Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3_spec__3(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; uint8_t x_10; 
x_10 = lean_usize_dec_eq(x_2, x_3);
if (x_10 == 0)
{
lean_object* x_11; lean_object* x_12; 
x_11 = lean_array_uget(x_1, x_2);
x_12 = lean_ctor_get(x_11, 1);
lean_inc(x_12);
lean_dec(x_11);
if (lean_obj_tag(x_12) == 1)
{
lean_object* x_13; lean_object* x_14; 
x_13 = lean_ctor_get(x_12, 0);
lean_inc_ref(x_13);
lean_dec_ref(x_12);
x_14 = lean_array_push(x_4, x_13);
x_5 = x_14;
goto block_9;
}
else
{
lean_dec(x_12);
x_5 = x_4;
goto block_9;
}
}
else
{
return x_4;
}
block_9:
{
size_t x_6; size_t x_7; 
x_6 = 1;
x_7 = lean_usize_add(x_2, x_6);
x_2 = x_7;
x_4 = x_5;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l_Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; uint8_t x_5; 
x_4 = l_Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3___closed__0;
x_5 = lean_nat_dec_lt(x_2, x_3);
if (x_5 == 0)
{
return x_4;
}
else
{
lean_object* x_6; uint8_t x_7; 
x_6 = lean_array_get_size(x_1);
x_7 = lean_nat_dec_le(x_3, x_6);
lean_dec(x_6);
if (x_7 == 0)
{
return x_4;
}
else
{
size_t x_8; size_t x_9; lean_object* x_10; 
x_8 = lean_usize_of_nat(x_2);
x_9 = lean_usize_of_nat(x_3);
x_10 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3_spec__3(x_1, x_8, x_9, x_4);
return x_10;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__0(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; 
x_5 = lean_usize_dec_lt(x_3, x_2);
if (x_5 == 0)
{
lean_dec_ref(x_1);
return x_4;
}
else
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; size_t x_12; size_t x_13; lean_object* x_14; 
x_6 = lean_ctor_get(x_1, 0);
x_7 = lean_ctor_get(x_6, 3);
x_8 = lean_array_uget(x_4, x_3);
x_9 = lean_unsigned_to_nat(0u);
x_10 = lean_array_uset(x_4, x_3, x_9);
lean_inc_ref(x_7);
x_11 = l_Lean_Syntax_Range_toLspRange(x_7, x_8);
x_12 = 1;
x_13 = lean_usize_add(x_3, x_12);
x_14 = lean_array_uset(x_10, x_3, x_11);
x_3 = x_13;
x_4 = x_14;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__5(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; uint8_t x_11; 
x_11 = lean_usize_dec_eq(x_3, x_4);
if (x_11 == 0)
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; 
x_12 = lean_array_uget(x_2, x_3);
x_13 = lean_array_get_size(x_5);
x_14 = lean_nat_sub(x_13, x_1);
x_15 = lean_nat_dec_lt(x_14, x_13);
lean_dec(x_13);
if (x_15 == 0)
{
lean_object* x_16; 
lean_dec(x_14);
x_16 = lean_array_push(x_5, x_12);
x_6 = x_16;
goto block_10;
}
else
{
lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; 
x_17 = lean_array_fget_borrowed(x_5, x_14);
lean_dec(x_14);
x_18 = lean_ctor_get(x_17, 0);
x_19 = lean_ctor_get(x_17, 1);
x_20 = lean_ctor_get(x_12, 0);
lean_inc(x_20);
x_21 = lean_ctor_get(x_12, 1);
lean_inc(x_21);
x_22 = lean_nat_dec_lt(x_19, x_20);
lean_dec(x_20);
if (x_22 == 0)
{
lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_29; 
lean_inc(x_19);
lean_inc(x_18);
if (lean_is_exclusive(x_12)) {
 lean_ctor_release(x_12, 0);
 lean_ctor_release(x_12, 1);
 x_23 = x_12;
} else {
 lean_dec_ref(x_12);
 x_23 = lean_box(0);
}
x_24 = lean_array_pop(x_5);
x_29 = lean_nat_dec_le(x_19, x_21);
if (x_29 == 0)
{
lean_dec(x_21);
x_25 = x_19;
goto block_28;
}
else
{
lean_dec(x_19);
x_25 = x_21;
goto block_28;
}
block_28:
{
lean_object* x_26; lean_object* x_27; 
if (lean_is_scalar(x_23)) {
 x_26 = lean_alloc_ctor(0, 2, 0);
} else {
 x_26 = x_23;
}
lean_ctor_set(x_26, 0, x_18);
lean_ctor_set(x_26, 1, x_25);
x_27 = lean_array_push(x_24, x_26);
x_6 = x_27;
goto block_10;
}
}
else
{
lean_object* x_30; 
lean_dec(x_21);
x_30 = lean_array_push(x_5, x_12);
x_6 = x_30;
goto block_10;
}
}
}
else
{
return x_5;
}
block_10:
{
size_t x_7; size_t x_8; 
x_7 = 1;
x_8 = lean_usize_add(x_3, x_7);
x_3 = x_8;
x_5 = x_6;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_14; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_44; lean_object* x_45; lean_object* x_48; uint8_t x_49; 
x_31 = lean_unsigned_to_nat(0u);
x_32 = lean_array_get_size(x_3);
x_33 = l_Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3(x_3, x_31, x_32);
lean_dec(x_32);
x_34 = lean_unsigned_to_nat(1u);
x_48 = lean_array_get_size(x_33);
x_49 = lean_nat_dec_eq(x_48, x_31);
if (x_49 == 0)
{
lean_object* x_50; lean_object* x_51; uint8_t x_54; 
x_50 = lean_nat_sub(x_48, x_34);
lean_dec(x_48);
x_54 = lean_nat_dec_le(x_31, x_50);
if (x_54 == 0)
{
lean_inc(x_50);
x_51 = x_50;
goto block_53;
}
else
{
x_51 = x_31;
goto block_53;
}
block_53:
{
uint8_t x_52; 
x_52 = lean_nat_dec_le(x_51, x_50);
if (x_52 == 0)
{
lean_dec(x_50);
lean_inc(x_51);
x_44 = x_51;
x_45 = x_51;
goto block_47;
}
else
{
x_44 = x_51;
x_45 = x_50;
goto block_47;
}
}
}
else
{
lean_dec(x_48);
x_35 = x_33;
goto block_43;
}
block_13:
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_9 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_9, 0, x_7);
lean_ctor_set(x_9, 1, x_8);
x_10 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_9);
x_11 = l_Std_Channel_Sync_send___redArg(x_6, x_10);
x_12 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_12, 0, x_11);
lean_ctor_set(x_12, 1, x_4);
return x_12;
}
block_30:
{
lean_object* x_15; lean_object* x_16; size_t x_17; size_t x_18; lean_object* x_19; size_t x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; 
x_15 = lean_ctor_get(x_1, 0);
lean_inc_ref(x_15);
lean_dec_ref(x_1);
x_16 = lean_ctor_get(x_2, 0);
lean_inc_ref(x_16);
x_17 = lean_array_size(x_14);
x_18 = 0;
x_19 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__0(x_2, x_17, x_18, x_14);
x_20 = lean_array_size(x_19);
x_21 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__1(x_20, x_18, x_19);
x_22 = l_Lean_Server_mkFileProgressNotification(x_16, x_21);
lean_dec_ref(x_16);
x_23 = lean_ctor_get(x_22, 0);
lean_inc_ref(x_23);
x_24 = lean_ctor_get(x_22, 1);
lean_inc(x_24);
lean_dec_ref(x_22);
x_25 = l_Lean_Json_toStructured_x3f___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__2(x_24);
if (lean_obj_tag(x_25) == 0)
{
lean_object* x_26; 
lean_dec_ref(x_25);
x_26 = lean_box(0);
x_6 = x_15;
x_7 = x_23;
x_8 = x_26;
goto block_13;
}
else
{
uint8_t x_27; 
x_27 = !lean_is_exclusive(x_25);
if (x_27 == 0)
{
x_6 = x_15;
x_7 = x_23;
x_8 = x_25;
goto block_13;
}
else
{
lean_object* x_28; lean_object* x_29; 
x_28 = lean_ctor_get(x_25, 0);
lean_inc(x_28);
lean_dec(x_25);
x_29 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_29, 0, x_28);
x_6 = x_15;
x_7 = x_23;
x_8 = x_29;
goto block_13;
}
}
}
block_43:
{
lean_object* x_36; lean_object* x_37; uint8_t x_38; 
x_36 = l_Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3___closed__0;
x_37 = lean_array_get_size(x_35);
x_38 = lean_nat_dec_lt(x_31, x_37);
if (x_38 == 0)
{
lean_dec(x_37);
lean_dec_ref(x_35);
x_14 = x_36;
goto block_30;
}
else
{
uint8_t x_39; 
x_39 = lean_nat_dec_le(x_37, x_37);
if (x_39 == 0)
{
lean_dec(x_37);
lean_dec_ref(x_35);
x_14 = x_36;
goto block_30;
}
else
{
size_t x_40; size_t x_41; lean_object* x_42; 
x_40 = 0;
x_41 = lean_usize_of_nat(x_37);
lean_dec(x_37);
x_42 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__5(x_34, x_35, x_40, x_41, x_36);
lean_dec_ref(x_35);
x_14 = x_42;
goto block_30;
}
}
}
block_47:
{
lean_object* x_46; 
x_46 = l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6___redArg(x_33, x_44, x_45);
lean_dec(x_45);
x_35 = x_46;
goto block_43;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
lean_dec(x_4);
lean_dec(x_1);
return x_8;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
size_t x_4; size_t x_5; lean_object* x_6; 
x_4 = lean_unbox_usize(x_1);
lean_dec(x_1);
x_5 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_6 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__1(x_4, x_5, x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3(x_1, x_2, x_3);
lean_dec(x_3);
lean_dec(x_2);
lean_dec_ref(x_1);
return x_4;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3_spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
size_t x_5; size_t x_6; lean_object* x_7; 
x_5 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_6 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_7 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3_spec__3(x_1, x_5, x_6, x_4);
lean_dec_ref(x_1);
return x_7;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
size_t x_5; size_t x_6; lean_object* x_7; 
x_5 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_6 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_7 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__0(x_1, x_5, x_6, x_4);
return x_7;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l___private_Init_Data_Array_QSort_Basic_0__Array_qsort_sort___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__6___redArg(x_1, x_2, x_3);
lean_dec(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
size_t x_6; size_t x_7; lean_object* x_8; 
x_6 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_7 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_8 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__5(x_1, x_2, x_6, x_7, x_5);
lean_dec_ref(x_2);
lean_dec(x_1);
return x_8;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress(x_1, x_2, x_3, x_4);
lean_dec_ref(x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_toStructured_x3f___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__0(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; 
x_2 = l_Lean_Lsp_instToJsonLeanIleanInfoParams_toJson(x_1);
x_3 = l_Lean_Json_Structured_fromJson_x3f(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__2(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; uint8_t x_10; 
x_10 = lean_usize_dec_eq(x_2, x_3);
if (x_10 == 0)
{
lean_object* x_11; uint8_t x_12; 
x_11 = lean_array_uget(x_1, x_2);
x_12 = lean_ctor_get_uint8(x_11, sizeof(void*)*5 + 2);
if (x_12 == 0)
{
lean_object* x_13; 
x_13 = lean_array_push(x_4, x_11);
x_5 = x_13;
goto block_9;
}
else
{
lean_dec(x_11);
x_5 = x_4;
goto block_9;
}
}
else
{
return x_4;
}
block_9:
{
size_t x_6; size_t x_7; 
x_6 = 1;
x_7 = lean_usize_add(x_2, x_6);
x_2 = x_7;
x_4 = x_5;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__1(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
uint8_t x_8; 
x_8 = lean_usize_dec_lt(x_4, x_3);
if (x_8 == 0)
{
lean_object* x_9; 
lean_dec_ref(x_1);
x_9 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_9, 0, x_5);
lean_ctor_set(x_9, 1, x_6);
return x_9;
}
else
{
lean_object* x_10; lean_object* x_11; uint8_t x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; size_t x_17; size_t x_18; lean_object* x_19; 
x_10 = lean_ctor_get(x_1, 0);
x_11 = lean_ctor_get(x_10, 3);
x_12 = lean_ctor_get_uint8(x_2, sizeof(void*)*10);
x_13 = lean_array_uget(x_5, x_4);
lean_inc_ref(x_11);
x_14 = l_Lean_Widget_msgToInteractiveDiagnostic(x_11, x_13, x_12);
x_15 = lean_unsigned_to_nat(0u);
x_16 = lean_array_uset(x_5, x_4, x_15);
x_17 = 1;
x_18 = lean_usize_add(x_4, x_17);
x_19 = lean_array_uset(x_16, x_4, x_14);
x_4 = x_18;
x_5 = x_19;
goto _start;
}
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_6; lean_object* x_7; uint8_t x_8; lean_object* x_9; uint8_t x_10; lean_object* x_11; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; lean_object* x_36; lean_object* x_37; lean_object* x_71; uint8_t x_72; lean_object* x_73; lean_object* x_74; uint8_t x_75; lean_object* x_76; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; uint8_t x_127; lean_object* x_128; lean_object* x_129; 
x_31 = lean_ctor_get(x_3, 0);
lean_inc_ref(x_31);
if (lean_is_exclusive(x_3)) {
 lean_ctor_release(x_3, 0);
 lean_ctor_release(x_3, 1);
 x_32 = x_3;
} else {
 lean_dec_ref(x_3);
 x_32 = lean_box(0);
}
x_33 = lean_ctor_get(x_31, 1);
lean_inc_ref(x_33);
x_34 = lean_ctor_get(x_31, 2);
lean_inc(x_34);
x_35 = lean_ctor_get_uint8(x_31, sizeof(void*)*4);
lean_dec_ref(x_31);
x_95 = lean_ctor_get(x_33, 0);
lean_inc_ref(x_95);
x_96 = lean_ctor_get(x_33, 1);
lean_inc(x_96);
lean_dec_ref(x_33);
x_127 = l_Lean_MessageLog_hasUnreported(x_95);
if (x_127 == 0)
{
uint8_t x_143; lean_object* x_144; lean_object* x_145; uint8_t x_146; 
lean_dec(x_96);
lean_dec_ref(x_95);
x_143 = lean_ctor_get_uint8(x_4, sizeof(void*)*2);
x_144 = lean_ctor_get(x_4, 0);
lean_inc_ref(x_144);
x_145 = lean_ctor_get(x_4, 1);
lean_inc_ref(x_145);
x_146 = lean_ctor_get_uint8(x_4, sizeof(void*)*2 + 1);
x_71 = x_4;
x_72 = x_143;
x_73 = x_144;
x_74 = x_145;
x_75 = x_146;
x_76 = lean_box(0);
goto block_78;
}
else
{
if (lean_obj_tag(x_96) == 0)
{
x_128 = x_4;
x_129 = lean_box(0);
goto block_142;
}
else
{
lean_object* x_147; lean_object* x_148; 
x_147 = lean_ctor_get(x_96, 0);
x_148 = lean_st_ref_get(x_147);
if (lean_obj_tag(x_148) == 0)
{
x_128 = x_4;
x_129 = lean_box(0);
goto block_142;
}
else
{
lean_object* x_149; lean_object* x_150; lean_object* x_151; 
x_149 = lean_ctor_get(x_148, 0);
lean_inc(x_149);
lean_dec_ref(x_148);
x_150 = l_Lean_Server_FileWorker_instImpl_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_;
x_151 = l___private_Init_Dynamic_0__Dynamic_get_x3fImpl___redArg(x_149, x_150);
lean_dec(x_149);
if (lean_obj_tag(x_151) == 1)
{
lean_object* x_152; 
lean_dec_ref(x_96);
lean_dec_ref(x_95);
x_152 = lean_ctor_get(x_151, 0);
lean_inc(x_152);
lean_dec_ref(x_151);
x_79 = x_152;
x_80 = x_4;
x_81 = lean_box(0);
goto block_94;
}
else
{
lean_dec(x_151);
x_128 = x_4;
x_129 = lean_box(0);
goto block_142;
}
}
}
}
block_16:
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
x_12 = lean_box(0);
x_13 = lean_array_push(x_9, x_6);
x_14 = lean_alloc_ctor(0, 2, 2);
lean_ctor_set(x_14, 0, x_13);
lean_ctor_set(x_14, 1, x_7);
lean_ctor_set_uint8(x_14, sizeof(void*)*2, x_8);
lean_ctor_set_uint8(x_14, sizeof(void*)*2 + 1, x_10);
x_15 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_15, 0, x_12);
lean_ctor_set(x_15, 1, x_14);
return x_15;
}
block_30:
{
lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; lean_object* x_27; uint8_t x_28; lean_object* x_29; 
x_23 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_23, 0, x_19);
lean_ctor_set(x_23, 1, x_22);
x_24 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_23);
x_25 = l_Std_Channel_Sync_send___redArg(x_21, x_24);
x_26 = lean_ctor_get_uint8(x_17, sizeof(void*)*2);
x_27 = lean_ctor_get(x_17, 0);
lean_inc_ref(x_27);
x_28 = lean_ctor_get_uint8(x_17, sizeof(void*)*2 + 1);
lean_dec_ref(x_17);
x_29 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode___closed__0;
x_6 = x_18;
x_7 = x_29;
x_8 = x_26;
x_9 = x_27;
x_10 = x_28;
x_11 = lean_box(0);
goto block_16;
}
block_70:
{
if (lean_obj_tag(x_34) == 1)
{
uint8_t x_38; 
lean_dec(x_32);
x_38 = !lean_is_exclusive(x_34);
if (x_38 == 0)
{
lean_object* x_39; uint8_t x_40; lean_object* x_41; lean_object* x_42; uint8_t x_43; lean_object* x_44; 
x_39 = lean_ctor_get(x_34, 0);
x_40 = lean_ctor_get_uint8(x_37, sizeof(void*)*2);
x_41 = lean_ctor_get(x_37, 0);
x_42 = lean_ctor_get(x_37, 1);
x_43 = lean_ctor_get_uint8(x_37, sizeof(void*)*2 + 1);
lean_inc(x_39);
lean_inc_ref(x_42);
x_44 = lean_array_push(x_42, x_39);
if (x_40 == 0)
{
lean_inc_ref(x_41);
lean_free_object(x_34);
lean_dec_ref(x_37);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_6 = x_39;
x_7 = x_44;
x_8 = x_40;
x_9 = x_41;
x_10 = x_43;
x_11 = lean_box(0);
goto block_16;
}
else
{
lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; 
x_45 = lean_ctor_get(x_2, 0);
lean_inc_ref(x_45);
lean_dec_ref(x_2);
x_46 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoUpdateNotification(x_45, x_44);
lean_dec_ref(x_44);
x_47 = lean_ctor_get(x_1, 0);
lean_inc_ref(x_47);
lean_dec_ref(x_1);
x_48 = lean_ctor_get(x_46, 0);
lean_inc_ref(x_48);
x_49 = lean_ctor_get(x_46, 1);
lean_inc(x_49);
lean_dec_ref(x_46);
x_50 = l_Lean_Json_toStructured_x3f___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__0(x_49);
if (lean_obj_tag(x_50) == 0)
{
lean_object* x_51; 
lean_dec_ref(x_50);
lean_free_object(x_34);
x_51 = lean_box(0);
x_17 = x_37;
x_18 = x_39;
x_19 = x_48;
x_20 = lean_box(0);
x_21 = x_47;
x_22 = x_51;
goto block_30;
}
else
{
lean_object* x_52; 
x_52 = lean_ctor_get(x_50, 0);
lean_inc(x_52);
lean_dec_ref(x_50);
lean_ctor_set(x_34, 0, x_52);
x_17 = x_37;
x_18 = x_39;
x_19 = x_48;
x_20 = lean_box(0);
x_21 = x_47;
x_22 = x_34;
goto block_30;
}
}
}
else
{
lean_object* x_53; uint8_t x_54; lean_object* x_55; lean_object* x_56; uint8_t x_57; lean_object* x_58; 
x_53 = lean_ctor_get(x_34, 0);
lean_inc(x_53);
lean_dec(x_34);
x_54 = lean_ctor_get_uint8(x_37, sizeof(void*)*2);
x_55 = lean_ctor_get(x_37, 0);
x_56 = lean_ctor_get(x_37, 1);
x_57 = lean_ctor_get_uint8(x_37, sizeof(void*)*2 + 1);
lean_inc(x_53);
lean_inc_ref(x_56);
x_58 = lean_array_push(x_56, x_53);
if (x_54 == 0)
{
lean_inc_ref(x_55);
lean_dec_ref(x_37);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_6 = x_53;
x_7 = x_58;
x_8 = x_54;
x_9 = x_55;
x_10 = x_57;
x_11 = lean_box(0);
goto block_16;
}
else
{
lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; 
x_59 = lean_ctor_get(x_2, 0);
lean_inc_ref(x_59);
lean_dec_ref(x_2);
x_60 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoUpdateNotification(x_59, x_58);
lean_dec_ref(x_58);
x_61 = lean_ctor_get(x_1, 0);
lean_inc_ref(x_61);
lean_dec_ref(x_1);
x_62 = lean_ctor_get(x_60, 0);
lean_inc_ref(x_62);
x_63 = lean_ctor_get(x_60, 1);
lean_inc(x_63);
lean_dec_ref(x_60);
x_64 = l_Lean_Json_toStructured_x3f___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__0(x_63);
if (lean_obj_tag(x_64) == 0)
{
lean_object* x_65; 
lean_dec_ref(x_64);
x_65 = lean_box(0);
x_17 = x_37;
x_18 = x_53;
x_19 = x_62;
x_20 = lean_box(0);
x_21 = x_61;
x_22 = x_65;
goto block_30;
}
else
{
lean_object* x_66; lean_object* x_67; 
x_66 = lean_ctor_get(x_64, 0);
lean_inc(x_66);
lean_dec_ref(x_64);
x_67 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_67, 0, x_66);
x_17 = x_37;
x_18 = x_53;
x_19 = x_62;
x_20 = lean_box(0);
x_21 = x_61;
x_22 = x_67;
goto block_30;
}
}
}
}
else
{
lean_object* x_68; lean_object* x_69; 
lean_dec(x_34);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_68 = lean_box(0);
if (lean_is_scalar(x_32)) {
 x_69 = lean_alloc_ctor(0, 2, 0);
} else {
 x_69 = x_32;
}
lean_ctor_set(x_69, 0, x_68);
lean_ctor_set(x_69, 1, x_37);
return x_69;
}
}
block_78:
{
if (x_75 == 0)
{
lean_object* x_77; 
lean_dec_ref(x_71);
x_77 = lean_alloc_ctor(0, 2, 2);
lean_ctor_set(x_77, 0, x_73);
lean_ctor_set(x_77, 1, x_74);
lean_ctor_set_uint8(x_77, sizeof(void*)*2, x_72);
lean_ctor_set_uint8(x_77, sizeof(void*)*2 + 1, x_35);
x_36 = lean_box(0);
x_37 = x_77;
goto block_70;
}
else
{
lean_dec_ref(x_74);
lean_dec_ref(x_73);
x_36 = lean_box(0);
x_37 = x_71;
goto block_70;
}
}
block_94:
{
lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; uint8_t x_86; 
x_82 = lean_ctor_get(x_2, 3);
x_83 = lean_st_ref_take(x_82);
x_84 = l_Array_append___redArg(x_83, x_79);
lean_dec_ref(x_79);
x_85 = lean_st_ref_set(x_82, x_84);
x_86 = lean_ctor_get_uint8(x_80, sizeof(void*)*2);
if (x_86 == 0)
{
lean_object* x_87; lean_object* x_88; uint8_t x_89; 
x_87 = lean_ctor_get(x_80, 0);
lean_inc_ref(x_87);
x_88 = lean_ctor_get(x_80, 1);
lean_inc_ref(x_88);
x_89 = lean_ctor_get_uint8(x_80, sizeof(void*)*2 + 1);
x_71 = x_80;
x_72 = x_86;
x_73 = x_87;
x_74 = x_88;
x_75 = x_89;
x_76 = lean_box(0);
goto block_78;
}
else
{
lean_object* x_90; lean_object* x_91; uint8_t x_92; lean_object* x_93; 
x_90 = lean_ctor_get(x_80, 0);
lean_inc_ref(x_90);
x_91 = lean_ctor_get(x_80, 1);
lean_inc_ref(x_91);
x_92 = lean_ctor_get_uint8(x_80, sizeof(void*)*2 + 1);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_93 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics(x_1, x_2);
x_71 = x_80;
x_72 = x_86;
x_73 = x_90;
x_74 = x_91;
x_75 = x_92;
x_76 = lean_box(0);
goto block_78;
}
}
block_126:
{
size_t x_100; size_t x_101; lean_object* x_102; 
x_100 = lean_array_size(x_97);
x_101 = 0;
lean_inc_ref(x_2);
x_102 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__1(x_2, x_1, x_100, x_101, x_97, x_98);
if (lean_obj_tag(x_96) == 1)
{
uint8_t x_103; 
x_103 = !lean_is_exclusive(x_102);
if (x_103 == 0)
{
uint8_t x_104; 
x_104 = !lean_is_exclusive(x_96);
if (x_104 == 0)
{
lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; 
x_105 = lean_ctor_get(x_102, 0);
x_106 = lean_ctor_get(x_102, 1);
x_107 = lean_ctor_get(x_96, 0);
x_108 = l_Lean_Server_FileWorker_instImpl_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_;
lean_inc(x_105);
lean_ctor_set(x_102, 1, x_105);
lean_ctor_set(x_102, 0, x_108);
lean_ctor_set(x_96, 0, x_102);
x_109 = lean_st_ref_set(x_107, x_96);
lean_dec(x_107);
x_79 = x_105;
x_80 = x_106;
x_81 = lean_box(0);
goto block_94;
}
else
{
lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; 
x_110 = lean_ctor_get(x_102, 0);
x_111 = lean_ctor_get(x_102, 1);
x_112 = lean_ctor_get(x_96, 0);
lean_inc(x_112);
lean_dec(x_96);
x_113 = l_Lean_Server_FileWorker_instImpl_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_;
lean_inc(x_110);
lean_ctor_set(x_102, 1, x_110);
lean_ctor_set(x_102, 0, x_113);
x_114 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_114, 0, x_102);
x_115 = lean_st_ref_set(x_112, x_114);
lean_dec(x_112);
x_79 = x_110;
x_80 = x_111;
x_81 = lean_box(0);
goto block_94;
}
}
else
{
lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; 
x_116 = lean_ctor_get(x_102, 0);
x_117 = lean_ctor_get(x_102, 1);
lean_inc(x_117);
lean_inc(x_116);
lean_dec(x_102);
x_118 = lean_ctor_get(x_96, 0);
lean_inc(x_118);
if (lean_is_exclusive(x_96)) {
 lean_ctor_release(x_96, 0);
 x_119 = x_96;
} else {
 lean_dec_ref(x_96);
 x_119 = lean_box(0);
}
x_120 = l_Lean_Server_FileWorker_instImpl_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_;
lean_inc(x_116);
x_121 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_121, 0, x_120);
lean_ctor_set(x_121, 1, x_116);
if (lean_is_scalar(x_119)) {
 x_122 = lean_alloc_ctor(1, 1, 0);
} else {
 x_122 = x_119;
}
lean_ctor_set(x_122, 0, x_121);
x_123 = lean_st_ref_set(x_118, x_122);
lean_dec(x_118);
x_79 = x_116;
x_80 = x_117;
x_81 = lean_box(0);
goto block_94;
}
}
else
{
lean_object* x_124; lean_object* x_125; 
lean_dec(x_96);
x_124 = lean_ctor_get(x_102, 0);
lean_inc(x_124);
x_125 = lean_ctor_get(x_102, 1);
lean_inc(x_125);
lean_dec_ref(x_102);
x_79 = x_124;
x_80 = x_125;
x_81 = lean_box(0);
goto block_94;
}
}
block_142:
{
lean_object* x_130; lean_object* x_131; lean_object* x_132; uint8_t x_133; 
x_130 = lean_ctor_get(x_1, 7);
x_131 = lean_ctor_get(x_130, 4);
x_132 = l_Lean_MessageLog_toArray(x_95);
lean_dec_ref(x_95);
x_133 = l_Lean_Lsp_ClientCapabilities_silentDiagnosticSupport(x_131);
if (x_133 == 0)
{
if (x_127 == 0)
{
x_97 = x_132;
x_98 = x_128;
x_99 = lean_box(0);
goto block_126;
}
else
{
lean_object* x_134; lean_object* x_135; lean_object* x_136; uint8_t x_137; 
x_134 = lean_unsigned_to_nat(0u);
x_135 = lean_array_get_size(x_132);
x_136 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode___closed__1;
x_137 = lean_nat_dec_lt(x_134, x_135);
if (x_137 == 0)
{
lean_dec(x_135);
lean_dec_ref(x_132);
x_97 = x_136;
x_98 = x_128;
x_99 = lean_box(0);
goto block_126;
}
else
{
uint8_t x_138; 
x_138 = lean_nat_dec_le(x_135, x_135);
if (x_138 == 0)
{
lean_dec(x_135);
lean_dec_ref(x_132);
x_97 = x_136;
x_98 = x_128;
x_99 = lean_box(0);
goto block_126;
}
else
{
size_t x_139; size_t x_140; lean_object* x_141; 
x_139 = 0;
x_140 = lean_usize_of_nat(x_135);
lean_dec(x_135);
x_141 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__2(x_132, x_139, x_140, x_136);
lean_dec_ref(x_132);
x_97 = x_141;
x_98 = x_128;
x_99 = lean_box(0);
goto block_126;
}
}
}
}
else
{
x_97 = x_132;
x_98 = x_128;
x_99 = lean_box(0);
goto block_126;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
size_t x_5; size_t x_6; lean_object* x_7; 
x_5 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_6 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_7 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__2(x_1, x_5, x_6, x_4);
lean_dec_ref(x_1);
return x_7;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
size_t x_8; size_t x_9; lean_object* x_10; 
x_8 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_9 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_10 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__1(x_1, x_2, x_8, x_9, x_5, x_6);
lean_dec_ref(x_2);
return x_10;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode(x_1, x_2, x_3, x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished_spec__0(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; 
x_5 = lean_usize_dec_lt(x_3, x_2);
if (x_5 == 0)
{
lean_dec_ref(x_1);
return x_4;
}
else
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_22; lean_object* x_23; lean_object* x_27; lean_object* x_28; 
x_6 = lean_array_uget(x_4, x_3);
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
x_8 = lean_ctor_get(x_6, 1);
lean_inc(x_8);
x_9 = lean_ctor_get(x_6, 2);
lean_inc(x_9);
x_10 = lean_ctor_get(x_6, 3);
lean_inc_ref(x_10);
if (lean_is_exclusive(x_6)) {
 lean_ctor_release(x_6, 0);
 lean_ctor_release(x_6, 1);
 lean_ctor_release(x_6, 2);
 lean_ctor_release(x_6, 3);
 x_11 = x_6;
} else {
 lean_dec_ref(x_6);
 x_11 = lean_box(0);
}
x_12 = lean_ctor_get(x_1, 1);
x_13 = lean_unsigned_to_nat(0u);
x_14 = lean_array_uset(x_4, x_3, x_13);
if (lean_obj_tag(x_12) == 1)
{
switch (lean_obj_tag(x_8)) {
case 1:
{
lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; uint8_t x_40; 
x_31 = lean_ctor_get(x_12, 0);
x_32 = lean_ctor_get(x_8, 0);
lean_inc_ref(x_32);
lean_dec_ref(x_8);
x_33 = lean_ctor_get(x_31, 0);
x_34 = lean_ctor_get(x_31, 1);
x_35 = lean_ctor_get(x_32, 0);
lean_inc(x_35);
x_36 = lean_ctor_get(x_32, 1);
lean_inc(x_36);
lean_dec_ref(x_32);
x_40 = lean_nat_dec_le(x_33, x_35);
if (x_40 == 0)
{
lean_dec(x_35);
lean_inc(x_33);
x_37 = x_33;
goto block_39;
}
else
{
x_37 = x_35;
goto block_39;
}
block_39:
{
uint8_t x_38; 
x_38 = lean_nat_dec_le(x_34, x_36);
if (x_38 == 0)
{
x_27 = x_37;
x_28 = x_36;
goto block_30;
}
else
{
lean_dec(x_36);
lean_inc(x_34);
x_27 = x_37;
x_28 = x_34;
goto block_30;
}
}
}
case 0:
{
lean_inc_ref(x_12);
x_15 = x_12;
goto block_21;
}
default: 
{
lean_object* x_41; 
lean_dec(x_8);
x_41 = lean_box(2);
x_15 = x_41;
goto block_21;
}
}
}
else
{
switch (lean_obj_tag(x_8)) {
case 1:
{
x_15 = x_8;
goto block_21;
}
case 0:
{
lean_inc(x_12);
x_15 = x_12;
goto block_21;
}
default: 
{
lean_object* x_42; 
lean_dec(x_8);
x_42 = lean_box(2);
x_15 = x_42;
goto block_21;
}
}
}
block_21:
{
lean_object* x_16; size_t x_17; size_t x_18; lean_object* x_19; 
if (lean_is_scalar(x_11)) {
 x_16 = lean_alloc_ctor(0, 4, 0);
} else {
 x_16 = x_11;
}
lean_ctor_set(x_16, 0, x_7);
lean_ctor_set(x_16, 1, x_15);
lean_ctor_set(x_16, 2, x_9);
lean_ctor_set(x_16, 3, x_10);
x_17 = 1;
x_18 = lean_usize_add(x_3, x_17);
x_19 = lean_array_uset(x_14, x_3, x_16);
x_3 = x_18;
x_4 = x_19;
goto _start;
}
block_26:
{
lean_object* x_24; lean_object* x_25; 
x_24 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_24, 0, x_22);
lean_ctor_set(x_24, 1, x_23);
x_25 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_25, 0, x_24);
x_15 = x_25;
goto block_21;
}
block_30:
{
uint8_t x_29; 
x_29 = lean_nat_dec_le(x_27, x_28);
if (x_29 == 0)
{
lean_dec(x_28);
lean_inc(x_27);
x_22 = x_27;
x_23 = x_27;
goto block_26;
}
else
{
x_22 = x_27;
x_23 = x_28;
goto block_26;
}
}
}
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = l_Array_empty(lean_box(0));
return x_1;
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(1u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_6; uint8_t x_7; 
x_6 = lean_ctor_get(x_3, 3);
x_7 = lean_io_get_task_state(x_6);
if (x_7 == 2)
{
lean_object* x_8; lean_object* x_9; uint8_t x_10; 
lean_inc_ref(x_6);
x_8 = lean_io_wait(x_6);
lean_inc(x_8);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_9 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode(x_1, x_2, x_8, x_4);
x_10 = !lean_is_exclusive(x_9);
if (x_10 == 0)
{
lean_object* x_11; lean_object* x_12; lean_object* x_13; size_t x_14; size_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; 
x_11 = lean_ctor_get(x_9, 1);
x_12 = lean_ctor_get(x_9, 0);
lean_dec(x_12);
x_13 = lean_ctor_get(x_8, 1);
lean_inc_ref(x_13);
lean_dec(x_8);
x_14 = lean_array_size(x_13);
x_15 = 0;
x_16 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished_spec__0(x_3, x_14, x_15, x_13);
x_17 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___closed__0;
x_18 = lean_unsigned_to_nat(0u);
x_19 = lean_array_get_size(x_16);
x_20 = lean_nat_dec_lt(x_18, x_19);
if (x_20 == 0)
{
lean_dec(x_19);
lean_dec_ref(x_16);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
lean_ctor_set(x_9, 0, x_17);
return x_9;
}
else
{
uint8_t x_21; 
x_21 = lean_nat_dec_le(x_19, x_19);
if (x_21 == 0)
{
lean_dec(x_19);
lean_dec_ref(x_16);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
lean_ctor_set(x_9, 0, x_17);
return x_9;
}
else
{
size_t x_22; lean_object* x_23; 
lean_free_object(x_9);
x_22 = lean_usize_of_nat(x_19);
lean_dec(x_19);
x_23 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished_spec__1(x_1, x_2, x_16, x_15, x_22, x_17, x_11);
lean_dec_ref(x_16);
return x_23;
}
}
}
else
{
lean_object* x_24; lean_object* x_25; size_t x_26; size_t x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; 
x_24 = lean_ctor_get(x_9, 1);
lean_inc(x_24);
lean_dec(x_9);
x_25 = lean_ctor_get(x_8, 1);
lean_inc_ref(x_25);
lean_dec(x_8);
x_26 = lean_array_size(x_25);
x_27 = 0;
x_28 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished_spec__0(x_3, x_26, x_27, x_25);
x_29 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___closed__0;
x_30 = lean_unsigned_to_nat(0u);
x_31 = lean_array_get_size(x_28);
x_32 = lean_nat_dec_lt(x_30, x_31);
if (x_32 == 0)
{
lean_object* x_33; 
lean_dec(x_31);
lean_dec_ref(x_28);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_33 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_33, 0, x_29);
lean_ctor_set(x_33, 1, x_24);
return x_33;
}
else
{
uint8_t x_34; 
x_34 = lean_nat_dec_le(x_31, x_31);
if (x_34 == 0)
{
lean_object* x_35; 
lean_dec(x_31);
lean_dec_ref(x_28);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_35 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_35, 0, x_29);
lean_ctor_set(x_35, 1, x_24);
return x_35;
}
else
{
size_t x_36; lean_object* x_37; 
x_36 = lean_usize_of_nat(x_31);
lean_dec(x_31);
x_37 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished_spec__1(x_1, x_2, x_28, x_27, x_36, x_29, x_24);
lean_dec_ref(x_28);
return x_37;
}
}
}
}
else
{
lean_object* x_38; lean_object* x_39; lean_object* x_40; 
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_38 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___closed__1;
x_39 = lean_array_push(x_38, x_3);
x_40 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_40, 0, x_39);
lean_ctor_set(x_40, 1, x_4);
return x_40;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished_spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_t x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
uint8_t x_9; 
x_9 = lean_usize_dec_eq(x_4, x_5);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; size_t x_15; size_t x_16; 
x_10 = lean_array_uget(x_3, x_4);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_11 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished(x_1, x_2, x_10, x_7);
x_12 = lean_ctor_get(x_11, 0);
lean_inc(x_12);
x_13 = lean_ctor_get(x_11, 1);
lean_inc(x_13);
lean_dec_ref(x_11);
x_14 = l_Array_append___redArg(x_6, x_12);
lean_dec(x_12);
x_15 = 1;
x_16 = lean_usize_add(x_4, x_15);
x_4 = x_16;
x_6 = x_14;
x_7 = x_13;
goto _start;
}
else
{
lean_object* x_18; 
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_18 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_18, 0, x_6);
lean_ctor_set(x_18, 1, x_7);
return x_18;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished_spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
size_t x_9; size_t x_10; lean_object* x_11; 
x_9 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_10 = lean_unbox_usize(x_5);
lean_dec(x_5);
x_11 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished_spec__1(x_1, x_2, x_3, x_9, x_10, x_6, x_7);
lean_dec_ref(x_3);
return x_11;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished(x_1, x_2, x_3, x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
size_t x_5; size_t x_6; lean_object* x_7; 
x_5 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_6 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_7 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished_spec__0(x_1, x_5, x_6, x_4);
return x_7;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks_spec__0(size_t x_1, size_t x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; 
x_4 = lean_usize_dec_lt(x_2, x_1);
if (x_4 == 0)
{
return x_3;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; size_t x_9; size_t x_10; lean_object* x_11; 
x_5 = lean_array_uget(x_3, x_2);
x_6 = lean_ctor_get(x_5, 3);
lean_inc_ref(x_6);
lean_dec(x_5);
x_7 = lean_unsigned_to_nat(0u);
x_8 = lean_array_uset(x_3, x_2, x_7);
x_9 = 1;
x_10 = lean_usize_add(x_2, x_9);
x_11 = lean_array_uset(x_8, x_2, x_6);
x_2 = x_10;
x_3 = x_11;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks_spec__1(uint8_t x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5) {
_start:
{
uint8_t x_7; 
x_7 = lean_usize_dec_eq(x_3, x_4);
if (x_7 == 0)
{
lean_object* x_8; lean_object* x_9; uint8_t x_10; uint8_t x_11; lean_object* x_12; 
x_8 = lean_array_uget(x_2, x_3);
x_9 = lean_ctor_get(x_8, 3);
lean_inc_ref(x_9);
lean_dec(x_8);
x_10 = lean_io_get_task_state(x_9);
lean_dec_ref(x_9);
x_11 = 1;
if (x_10 == 2)
{
x_12 = x_5;
goto block_15;
}
else
{
if (x_1 == 0)
{
size_t x_16; size_t x_17; 
x_16 = 1;
x_17 = lean_usize_add(x_3, x_16);
x_3 = x_17;
goto _start;
}
else
{
x_12 = x_5;
goto block_15;
}
}
block_15:
{
lean_object* x_13; lean_object* x_14; 
x_13 = lean_box(x_11);
x_14 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_14, 0, x_13);
lean_ctor_set(x_14, 1, x_12);
return x_14;
}
}
else
{
uint8_t x_19; lean_object* x_20; lean_object* x_21; 
x_19 = 0;
x_20 = lean_box(x_19);
x_21 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_21, 0, x_20);
lean_ctor_set(x_21, 1, x_5);
return x_21;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; 
x_34 = l_IO_CancelToken_isSet(x_3);
if (x_34 == 0)
{
lean_object* x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; 
x_52 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___closed__0;
x_53 = lean_unsigned_to_nat(0u);
x_54 = lean_array_get_size(x_4);
x_55 = lean_nat_dec_lt(x_53, x_54);
if (x_55 == 0)
{
lean_dec(x_54);
lean_dec_ref(x_4);
x_35 = x_52;
x_36 = x_5;
x_37 = lean_box(0);
goto block_51;
}
else
{
uint8_t x_56; 
x_56 = lean_nat_dec_le(x_54, x_54);
if (x_56 == 0)
{
lean_dec(x_54);
lean_dec_ref(x_4);
x_35 = x_52;
x_36 = x_5;
x_37 = lean_box(0);
goto block_51;
}
else
{
size_t x_57; size_t x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; 
x_57 = 0;
x_58 = lean_usize_of_nat(x_54);
lean_dec(x_54);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_59 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished_spec__1(x_1, x_2, x_4, x_57, x_58, x_52, x_5);
lean_dec_ref(x_4);
x_60 = lean_ctor_get(x_59, 0);
lean_inc(x_60);
x_61 = lean_ctor_get(x_59, 1);
lean_inc(x_61);
lean_dec_ref(x_59);
x_35 = x_60;
x_36 = x_61;
x_37 = lean_box(0);
goto block_51;
}
}
}
else
{
lean_object* x_62; lean_object* x_63; 
lean_dec_ref(x_4);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_62 = lean_box(0);
x_63 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_63, 0, x_62);
lean_ctor_set(x_63, 1, x_5);
return x_63;
}
block_16:
{
size_t x_10; size_t x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 
x_10 = lean_array_size(x_7);
x_11 = 0;
lean_inc_ref(x_7);
x_12 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks_spec__0(x_10, x_11, x_7);
x_13 = lean_array_to_list(x_12);
x_14 = lean_io_wait_any(x_13);
lean_dec(x_13);
lean_dec(x_14);
x_4 = x_7;
x_5 = x_8;
goto _start;
}
block_33:
{
uint8_t x_22; 
x_22 = lean_nat_dec_lt(x_18, x_19);
lean_dec(x_19);
if (x_22 == 0)
{
lean_object* x_23; lean_object* x_24; 
lean_dec_ref(x_17);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_23 = lean_box(0);
x_24 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_24, 0, x_23);
lean_ctor_set(x_24, 1, x_20);
return x_24;
}
else
{
uint8_t x_25; 
x_25 = lean_ctor_get_uint8(x_20, sizeof(void*)*2);
if (x_25 == 0)
{
uint8_t x_26; 
x_26 = !lean_is_exclusive(x_20);
if (x_26 == 0)
{
lean_object* x_27; 
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_27 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics(x_1, x_2);
lean_ctor_set_uint8(x_20, sizeof(void*)*2, x_22);
x_7 = x_17;
x_8 = x_20;
x_9 = lean_box(0);
goto block_16;
}
else
{
lean_object* x_28; lean_object* x_29; uint8_t x_30; lean_object* x_31; lean_object* x_32; 
x_28 = lean_ctor_get(x_20, 0);
x_29 = lean_ctor_get(x_20, 1);
x_30 = lean_ctor_get_uint8(x_20, sizeof(void*)*2 + 1);
lean_inc(x_29);
lean_inc(x_28);
lean_dec(x_20);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_31 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics(x_1, x_2);
x_32 = lean_alloc_ctor(0, 2, 2);
lean_ctor_set(x_32, 0, x_28);
lean_ctor_set(x_32, 1, x_29);
lean_ctor_set_uint8(x_32, sizeof(void*)*2, x_22);
lean_ctor_set_uint8(x_32, sizeof(void*)*2 + 1, x_30);
x_7 = x_17;
x_8 = x_32;
x_9 = lean_box(0);
goto block_16;
}
}
else
{
x_7 = x_17;
x_8 = x_20;
x_9 = lean_box(0);
goto block_16;
}
}
}
block_51:
{
lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; 
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_38 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress(x_1, x_2, x_35, x_36);
x_39 = lean_ctor_get(x_38, 1);
lean_inc(x_39);
lean_dec_ref(x_38);
x_40 = lean_unsigned_to_nat(0u);
x_41 = lean_array_get_size(x_35);
x_42 = lean_nat_dec_lt(x_40, x_41);
if (x_42 == 0)
{
x_17 = x_35;
x_18 = x_40;
x_19 = x_41;
x_20 = x_39;
x_21 = lean_box(0);
goto block_33;
}
else
{
if (x_42 == 0)
{
x_17 = x_35;
x_18 = x_40;
x_19 = x_41;
x_20 = x_39;
x_21 = lean_box(0);
goto block_33;
}
else
{
size_t x_43; size_t x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; 
x_43 = 0;
x_44 = lean_usize_of_nat(x_41);
x_45 = l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks_spec__1(x_34, x_35, x_43, x_44, x_39);
x_46 = lean_ctor_get(x_45, 0);
lean_inc(x_46);
x_47 = lean_unbox(x_46);
lean_dec(x_46);
if (x_47 == 0)
{
lean_object* x_48; 
x_48 = lean_ctor_get(x_45, 1);
lean_inc(x_48);
lean_dec_ref(x_45);
x_17 = x_35;
x_18 = x_40;
x_19 = x_41;
x_20 = x_48;
x_21 = lean_box(0);
goto block_33;
}
else
{
lean_object* x_49; 
lean_dec(x_41);
x_49 = lean_ctor_get(x_45, 1);
lean_inc(x_49);
lean_dec_ref(x_45);
x_4 = x_35;
x_5 = x_49;
goto _start;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
size_t x_4; size_t x_5; lean_object* x_6; 
x_4 = lean_unbox_usize(x_1);
lean_dec(x_1);
x_5 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_6 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks_spec__0(x_4, x_5, x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks_spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
uint8_t x_7; size_t x_8; size_t x_9; lean_object* x_10; 
x_7 = lean_unbox(x_1);
x_8 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_9 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_10 = l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks_spec__1(x_7, x_2, x_8, x_9, x_5);
lean_dec_ref(x_2);
return x_10;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks(x_1, x_2, x_3, x_4, x_5);
lean_dec(x_3);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Option_get___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_spec__0(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; 
x_3 = lean_ctor_get(x_2, 0);
x_4 = lean_ctor_get(x_2, 1);
x_5 = l_Lean_KVMap_find(x_1, x_3);
if (lean_obj_tag(x_5) == 0)
{
lean_inc(x_4);
return x_4;
}
else
{
lean_object* x_6; 
x_6 = lean_ctor_get(x_5, 0);
lean_inc(x_6);
lean_dec_ref(x_5);
if (lean_obj_tag(x_6) == 3)
{
lean_object* x_7; 
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
lean_dec_ref(x_6);
return x_7;
}
else
{
lean_dec(x_6);
lean_inc(x_4);
return x_4;
}
}
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__0___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__0(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; 
x_2 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__0___closed__0;
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__1___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lean_Language_Lean_instToSnapshotTreeCommandParsedSnapshot_go), 1, 0);
return x_1;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__1(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_3 = lean_ctor_get(x_2, 0);
lean_inc_ref(x_3);
x_4 = lean_ctor_get(x_2, 1);
lean_inc_ref(x_4);
x_5 = lean_ctor_get(x_2, 2);
lean_inc(x_5);
lean_dec_ref(x_2);
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_16; 
x_16 = lean_box(0);
x_6 = x_16;
goto block_15;
}
else
{
uint8_t x_17; 
x_17 = !lean_is_exclusive(x_5);
if (x_17 == 0)
{
lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; lean_object* x_24; 
x_18 = lean_ctor_get(x_5, 0);
x_19 = lean_ctor_get(x_18, 1);
lean_inc_ref(x_19);
lean_dec(x_18);
x_20 = lean_ctor_get(x_19, 0);
lean_inc(x_20);
x_21 = lean_ctor_get(x_19, 1);
lean_inc(x_21);
x_22 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__1___closed__0;
x_23 = 1;
x_24 = l_Lean_Language_SnapshotTask_map___redArg(x_19, x_22, x_20, x_21, x_23);
lean_ctor_set(x_5, 0, x_24);
x_6 = x_5;
goto block_15;
}
else
{
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; lean_object* x_31; lean_object* x_32; 
x_25 = lean_ctor_get(x_5, 0);
lean_inc(x_25);
lean_dec(x_5);
x_26 = lean_ctor_get(x_25, 1);
lean_inc_ref(x_26);
lean_dec(x_25);
x_27 = lean_ctor_get(x_26, 0);
lean_inc(x_27);
x_28 = lean_ctor_get(x_26, 1);
lean_inc(x_28);
x_29 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__1___closed__0;
x_30 = 1;
x_31 = l_Lean_Language_SnapshotTask_map___redArg(x_26, x_29, x_27, x_28, x_30);
x_32 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_32, 0, x_31);
x_6 = x_32;
goto block_15;
}
}
block_15:
{
lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 
x_7 = lean_ctor_get(x_4, 0);
lean_inc(x_7);
x_8 = lean_ctor_get(x_4, 1);
lean_inc(x_8);
x_9 = 1;
x_10 = l_Lean_Language_SnapshotTask_map___redArg(x_4, x_1, x_7, x_8, x_9);
x_11 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___closed__1;
x_12 = lean_array_push(x_11, x_10);
x_13 = l_Lean_Language_Lean_pushOpt___redArg(x_6, x_12);
x_14 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_14, 0, x_3);
lean_ctor_set(x_14, 1, x_13);
return x_14;
}
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__3___closed__0() {
_start:
{
lean_object* x_1; uint8_t x_2; lean_object* x_3; 
x_1 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode___closed__0;
x_2 = 0;
x_3 = lean_alloc_ctor(0, 2, 2);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_1);
lean_ctor_set_uint8(x_3, sizeof(void*)*2, x_2);
lean_ctor_set_uint8(x_3, sizeof(void*)*2 + 1, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__3(uint32_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_31; lean_object* x_32; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; 
x_17 = l_IO_sleep(x_1);
x_18 = lean_ctor_get(x_2, 0);
lean_inc_ref(x_18);
x_19 = lean_ctor_get(x_2, 1);
x_54 = lean_ctor_get(x_19, 0);
x_55 = lean_ctor_get(x_19, 1);
x_56 = lean_ctor_get(x_19, 4);
lean_inc(x_56);
x_57 = lean_box(0);
if (lean_obj_tag(x_56) == 0)
{
lean_dec_ref(x_7);
x_58 = x_57;
goto block_91;
}
else
{
uint8_t x_92; 
x_92 = !lean_is_exclusive(x_56);
if (x_92 == 0)
{
lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; uint8_t x_97; lean_object* x_98; 
x_93 = lean_ctor_get(x_56, 0);
x_94 = lean_ctor_get(x_93, 1);
lean_inc_ref(x_94);
lean_dec(x_93);
x_95 = lean_ctor_get(x_94, 0);
lean_inc(x_95);
x_96 = lean_ctor_get(x_94, 1);
lean_inc(x_96);
x_97 = 1;
x_98 = l_Lean_Language_SnapshotTask_map___redArg(x_94, x_7, x_95, x_96, x_97);
lean_ctor_set(x_56, 0, x_98);
x_58 = x_56;
goto block_91;
}
else
{
lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; uint8_t x_103; lean_object* x_104; lean_object* x_105; 
x_99 = lean_ctor_get(x_56, 0);
lean_inc(x_99);
lean_dec(x_56);
x_100 = lean_ctor_get(x_99, 1);
lean_inc_ref(x_100);
lean_dec(x_99);
x_101 = lean_ctor_get(x_100, 0);
lean_inc(x_101);
x_102 = lean_ctor_get(x_100, 1);
lean_inc(x_102);
x_103 = 1;
x_104 = l_Lean_Language_SnapshotTask_map___redArg(x_100, x_7, x_101, x_102, x_103);
x_105 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_105, 0, x_104);
x_58 = x_105;
goto block_91;
}
}
block_16:
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
x_12 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_12, 0, x_10);
lean_ctor_set(x_12, 1, x_11);
x_13 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_12);
x_14 = l_Std_Channel_Sync_send___redArg(x_3, x_13);
x_15 = lean_box(0);
return x_15;
}
block_30:
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; 
x_22 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoFinalNotification(x_18, x_20);
lean_dec_ref(x_20);
x_23 = lean_ctor_get(x_22, 0);
lean_inc_ref(x_23);
x_24 = lean_ctor_get(x_22, 1);
lean_inc(x_24);
lean_dec_ref(x_22);
x_25 = l_Lean_Json_toStructured_x3f___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode_spec__0(x_24);
if (lean_obj_tag(x_25) == 0)
{
lean_object* x_26; 
lean_dec_ref(x_25);
x_26 = lean_box(0);
x_9 = lean_box(0);
x_10 = x_23;
x_11 = x_26;
goto block_16;
}
else
{
uint8_t x_27; 
x_27 = !lean_is_exclusive(x_25);
if (x_27 == 0)
{
x_9 = lean_box(0);
x_10 = x_23;
x_11 = x_25;
goto block_16;
}
else
{
lean_object* x_28; lean_object* x_29; 
x_28 = lean_ctor_get(x_25, 0);
lean_inc(x_28);
lean_dec(x_25);
x_29 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_29, 0, x_28);
x_9 = lean_box(0);
x_10 = x_23;
x_11 = x_29;
goto block_16;
}
}
}
block_37:
{
uint8_t x_33; 
x_33 = lean_ctor_get_uint8(x_31, sizeof(void*)*2);
if (x_33 == 0)
{
lean_object* x_34; lean_object* x_35; 
x_34 = lean_ctor_get(x_31, 0);
lean_inc_ref(x_34);
lean_dec_ref(x_31);
x_35 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics(x_4, x_2);
x_20 = x_34;
x_21 = lean_box(0);
goto block_30;
}
else
{
lean_object* x_36; 
lean_dec_ref(x_4);
lean_dec_ref(x_2);
x_36 = lean_ctor_get(x_31, 0);
lean_inc_ref(x_36);
lean_dec_ref(x_31);
x_20 = x_36;
x_21 = lean_box(0);
goto block_30;
}
}
block_45:
{
lean_object* x_42; lean_object* x_43; lean_object* x_44; 
x_42 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_42, 0, x_38);
lean_ctor_set(x_42, 1, x_41);
x_43 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_42);
lean_inc_ref(x_3);
x_44 = l_Std_Channel_send___redArg(x_3, x_43);
lean_dec_ref(x_44);
x_31 = x_39;
x_32 = lean_box(0);
goto block_37;
}
block_53:
{
lean_object* x_50; lean_object* x_51; lean_object* x_52; 
x_50 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_50, 0, x_48);
lean_ctor_set(x_50, 1, x_49);
x_51 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_50);
lean_inc_ref(x_3);
x_52 = l_Std_Channel_send___redArg(x_3, x_51);
lean_dec_ref(x_52);
x_31 = x_46;
x_32 = lean_box(0);
goto block_37;
}
block_91:
{
lean_object* x_59; lean_object* x_60; uint8_t x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; uint8_t x_73; 
x_59 = lean_ctor_get(x_55, 0);
x_60 = lean_ctor_get(x_55, 1);
x_61 = 1;
lean_inc(x_60);
lean_inc(x_59);
lean_inc_ref(x_55);
x_62 = l_Lean_Language_SnapshotTask_map___redArg(x_55, x_5, x_59, x_60, x_61);
x_63 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___closed__1;
x_64 = lean_array_push(x_63, x_62);
x_65 = l_Lean_Language_Lean_pushOpt___redArg(x_58, x_64);
lean_inc_ref(x_54);
x_66 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_66, 0, x_54);
lean_ctor_set(x_66, 1, x_65);
x_67 = l_Lean_Language_SnapshotTask_finished___redArg(x_57, x_66);
x_68 = lean_array_push(x_63, x_67);
x_69 = lean_unsigned_to_nat(0u);
x_70 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__3___closed__0;
lean_inc_ref(x_2);
lean_inc_ref(x_4);
x_71 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleTasks(x_4, x_2, x_6, x_68, x_70);
x_72 = lean_ctor_get(x_71, 1);
lean_inc(x_72);
lean_dec_ref(x_71);
x_73 = l_IO_CancelToken_isSet(x_6);
if (x_73 == 0)
{
uint8_t x_74; 
x_74 = lean_ctor_get_uint8(x_72, sizeof(void*)*2 + 1);
if (x_74 == 0)
{
lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; 
x_75 = l_Lean_Server_mkFileProgressDoneNotification(x_18);
x_76 = lean_ctor_get(x_75, 0);
lean_inc_ref(x_76);
x_77 = lean_ctor_get(x_75, 1);
lean_inc(x_77);
lean_dec_ref(x_75);
x_78 = l_Lean_Json_toStructured_x3f___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__2(x_77);
if (lean_obj_tag(x_78) == 0)
{
lean_dec_ref(x_78);
x_38 = x_76;
x_39 = x_72;
x_40 = lean_box(0);
x_41 = x_57;
goto block_45;
}
else
{
uint8_t x_79; 
x_79 = !lean_is_exclusive(x_78);
if (x_79 == 0)
{
x_38 = x_76;
x_39 = x_72;
x_40 = lean_box(0);
x_41 = x_78;
goto block_45;
}
else
{
lean_object* x_80; lean_object* x_81; 
x_80 = lean_ctor_get(x_78, 0);
lean_inc(x_80);
lean_dec(x_78);
x_81 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_81, 0, x_80);
x_38 = x_76;
x_39 = x_72;
x_40 = lean_box(0);
x_41 = x_81;
goto block_45;
}
}
}
else
{
uint8_t x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; 
x_82 = 1;
lean_inc_ref(x_18);
x_83 = l_Lean_Server_mkFileProgressAtPosNotification(x_18, x_69, x_82);
x_84 = lean_ctor_get(x_83, 0);
lean_inc_ref(x_84);
x_85 = lean_ctor_get(x_83, 1);
lean_inc(x_85);
lean_dec_ref(x_83);
x_86 = l_Lean_Json_toStructured_x3f___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__2(x_85);
if (lean_obj_tag(x_86) == 0)
{
lean_dec_ref(x_86);
x_46 = x_72;
x_47 = lean_box(0);
x_48 = x_84;
x_49 = x_57;
goto block_53;
}
else
{
uint8_t x_87; 
x_87 = !lean_is_exclusive(x_86);
if (x_87 == 0)
{
x_46 = x_72;
x_47 = lean_box(0);
x_48 = x_84;
x_49 = x_86;
goto block_53;
}
else
{
lean_object* x_88; lean_object* x_89; 
x_88 = lean_ctor_get(x_86, 0);
lean_inc(x_88);
lean_dec(x_86);
x_89 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_89, 0, x_88);
x_46 = x_72;
x_47 = lean_box(0);
x_48 = x_84;
x_49 = x_89;
goto block_53;
}
}
}
}
else
{
lean_object* x_90; 
lean_dec(x_72);
lean_dec_ref(x_18);
lean_dec_ref(x_4);
lean_dec_ref(x_3);
lean_dec_ref(x_2);
x_90 = lean_box(0);
return x_90;
}
}
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = l_Lean_Server_FileWorker_server_reportDelayMs;
return x_1;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
uint32_t x_9; lean_object* x_10; 
x_9 = lean_unbox_uint32(x_1);
lean_dec(x_1);
x_10 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__3(x_9, x_2, x_3, x_4, x_5, x_6, x_7);
lean_dec(x_6);
return x_10;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint32_t x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 
x_5 = lean_ctor_get(x_1, 0);
lean_inc_ref(x_5);
x_6 = lean_ctor_get(x_1, 9);
x_7 = lean_alloc_closure((void*)(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__0), 1, 0);
lean_inc_ref(x_7);
x_8 = lean_alloc_closure((void*)(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__1), 2, 1);
lean_closure_set(x_8, 0, x_7);
x_9 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___closed__0;
x_10 = l_Lean_Option_get___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_spec__0(x_6, x_9);
x_11 = lean_uint32_of_nat(x_10);
lean_dec(x_10);
x_12 = lean_box_uint32(x_11);
x_13 = lean_alloc_closure((void*)(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__3___boxed), 8, 7);
lean_closure_set(x_13, 0, x_12);
lean_closure_set(x_13, 1, x_2);
lean_closure_set(x_13, 2, x_5);
lean_closure_set(x_13, 3, x_1);
lean_closure_set(x_13, 4, x_7);
lean_closure_set(x_13, 5, x_3);
lean_closure_set(x_13, 6, x_8);
x_14 = l_Lean_Server_ServerTask_BaseIO_asTask___redArg(x_13);
return x_14;
}
}
LEAN_EXPORT lean_object* l_Lean_Option_get___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_spec__0___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Option_get___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_spec__0(x_1, x_2);
lean_dec_ref(x_2);
lean_dec(x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots(x_1, x_2, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_1535841126____hygCtx___hyg_2_() {
_start:
{
uint8_t x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; 
x_2 = 0;
x_3 = lean_box(x_2);
x_4 = lean_st_mk_ref(x_3);
x_5 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_5, 0, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_1535841126____hygCtx___hyg_2____boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_1535841126____hygCtx___hyg_2_();
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_setupImports_spec__2(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; 
x_2 = l_Lean_Lsp_instToJsonLeanILeanHeaderSetupInfoParams_toJson(x_1);
x_3 = l_Lean_Json_Structured_fromJson_x3f(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_setupImports_spec__3(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; 
x_2 = l_Lean_Lsp_instToJsonLeanILeanHeaderInfoParams_toJson(x_1);
x_3 = l_Lean_Json_Structured_fromJson_x3f(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Option_set___at___00Lean_Option_setIfNotSet___at___00Lean_Server_FileWorker_setupImports_spec__0_spec__0(lean_object* x_1, lean_object* x_2, uint8_t x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_4 = lean_ctor_get(x_2, 0);
lean_inc(x_4);
lean_dec_ref(x_2);
x_5 = lean_alloc_ctor(1, 0, 1);
lean_ctor_set_uint8(x_5, 0, x_3);
x_6 = l_Lean_KVMap_insert(x_1, x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Option_setIfNotSet___at___00Lean_Server_FileWorker_setupImports_spec__0(lean_object* x_1, lean_object* x_2, uint8_t x_3) {
_start:
{
lean_object* x_4; uint8_t x_5; 
x_4 = lean_ctor_get(x_2, 0);
x_5 = l_Lean_KVMap_contains(x_1, x_4);
if (x_5 == 0)
{
lean_object* x_6; 
x_6 = l_Lean_Option_set___at___00Lean_Option_setIfNotSet___at___00Lean_Server_FileWorker_setupImports_spec__0_spec__0(x_1, x_2, x_3);
return x_6;
}
else
{
lean_dec_ref(x_2);
return x_1;
}
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___lam__0___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_2, 0, x_1);
lean_ctor_set(x_2, 1, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___lam__0___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_unsigned_to_nat(1u);
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___lam__0___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lean_Server_FileWorker_setupImports___lam__0___closed__1;
x_2 = l_Lean_Server_FileWorker_setupImports___lam__0___closed__0;
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___lam__0___closed__3() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3; 
x_1 = 2;
x_2 = lean_box(x_1);
x_3 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_3, 0, x_2);
return x_3;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___lam__0___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(1u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_setupImports___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_28; 
x_5 = lean_ctor_get(x_1, 3);
x_6 = lean_ctor_get(x_5, 0);
x_7 = l_Lean_Server_FileWorker_setupImports___lam__0___closed__0;
x_8 = l_Lean_Server_FileWorker_setupImports___lam__0___closed__2;
x_9 = lean_string_utf8_byte_size(x_6);
lean_inc_ref(x_5);
x_10 = l_Lean_FileMap_utf8PosToLspPos(x_5, x_9);
lean_dec(x_9);
x_11 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_11, 0, x_7);
lean_ctor_set(x_11, 1, x_10);
x_12 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_12, 0, x_11);
x_13 = l_Lean_Server_FileWorker_setupImports___lam__0___closed__3;
x_14 = lean_box(0);
x_15 = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(x_15, 0, x_8);
lean_ctor_set(x_15, 1, x_12);
lean_ctor_set(x_15, 2, x_13);
lean_ctor_set(x_15, 3, x_14);
lean_ctor_set(x_15, 4, x_14);
lean_ctor_set(x_15, 5, x_14);
lean_ctor_set(x_15, 6, x_3);
lean_ctor_set(x_15, 7, x_14);
lean_ctor_set(x_15, 8, x_14);
lean_ctor_set(x_15, 9, x_14);
lean_ctor_set(x_15, 10, x_14);
x_16 = l_Lean_Server_FileWorker_setupImports___lam__0___closed__4;
x_17 = lean_array_push(x_16, x_15);
x_18 = l_Lean_Server_mkPublishDiagnosticsNotification(x_1, x_17);
x_19 = lean_ctor_get(x_18, 0);
lean_inc_ref(x_19);
x_20 = lean_ctor_get(x_18, 1);
lean_inc(x_20);
if (lean_is_exclusive(x_18)) {
 lean_ctor_release(x_18, 0);
 lean_ctor_release(x_18, 1);
 x_21 = x_18;
} else {
 lean_dec_ref(x_18);
 x_21 = lean_box(0);
}
x_28 = l_Lean_Json_toStructured_x3f___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics_spec__1(x_20);
if (lean_obj_tag(x_28) == 0)
{
lean_dec_ref(x_28);
x_22 = x_14;
goto block_27;
}
else
{
uint8_t x_29; 
x_29 = !lean_is_exclusive(x_28);
if (x_29 == 0)
{
x_22 = x_28;
goto block_27;
}
else
{
lean_object* x_30; lean_object* x_31; 
x_30 = lean_ctor_get(x_28, 0);
lean_inc(x_30);
lean_dec(x_28);
x_31 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_31, 0, x_30);
x_22 = x_31;
goto block_27;
}
}
block_27:
{
lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; 
if (lean_is_scalar(x_21)) {
 x_23 = lean_alloc_ctor(1, 2, 0);
} else {
 x_23 = x_21;
 lean_ctor_set_tag(x_23, 1);
}
lean_ctor_set(x_23, 0, x_19);
lean_ctor_set(x_23, 1, x_22);
x_24 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_23);
x_25 = l_Std_Channel_Sync_send___redArg(x_2, x_24);
x_26 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_26, 0, x_25);
return x_26;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_setupImports___lam__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_inc_ref(x_3);
return x_3;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_importsLoadedRef;
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = l_Lean_Language_instInhabitedSnapshot_default;
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("setupImports", 12, 12);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; 
x_1 = l_Lean_Server_FileWorker_setupImports___closed__2;
x_2 = l_Lean_Server_FileWorker_initFn___closed__7_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_3 = l_Lean_Server_FileWorker_initFn___closed__6_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_4 = l_Lean_Server_FileWorker_initFn___closed__5_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_5 = l_Lean_Name_mkStr4(x_4, x_3, x_2, x_1);
return x_5;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___closed__4() {
_start:
{
lean_object* x_1; 
x_1 = l_Lean_Language_Snapshot_Diagnostics_empty;
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___closed__5() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(32u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_setupImports___closed__5;
x_2 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___closed__7() {
_start:
{
size_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; 
x_1 = 5;
x_2 = lean_unsigned_to_nat(0u);
x_3 = l_Lean_Server_FileWorker_setupImports___closed__5;
x_4 = l_Lean_Server_FileWorker_setupImports___closed__6;
x_5 = lean_alloc_ctor(0, 4, sizeof(size_t)*1);
lean_ctor_set(x_5, 0, x_4);
lean_ctor_set(x_5, 1, x_3);
lean_ctor_set(x_5, 2, x_2);
lean_ctor_set(x_5, 3, x_2);
lean_ctor_set_usize(x_5, 4, x_1);
return x_5;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___closed__8() {
_start:
{
lean_object* x_1; uint64_t x_2; lean_object* x_3; 
x_1 = l_Lean_Server_FileWorker_setupImports___closed__7;
x_2 = 0;
x_3 = lean_alloc_ctor(0, 1, 8);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set_uint64(x_3, sizeof(void*)*1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___closed__9() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_setupImports___closed__1;
x_2 = l_Lean_Language_instInhabitedSnapshotTask_default___redArg(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___closed__10() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Imports are out of date and must be rebuilt; use the \"Restart File\" command in your editor.", 91, 91);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___closed__11() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3; 
x_1 = 1;
x_2 = l_Lean_Server_FileWorker_setupImports___closed__3;
x_3 = l_Lean_Name_toString(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___closed__12() {
_start:
{
lean_object* x_1; 
x_1 = l_Lean_Elab_async;
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___closed__13() {
_start:
{
lean_object* x_1; 
x_1 = l_Lean_Elab_inServer;
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_setupImports___closed__14() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_setupImports___lam__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_setupImports___lam__0(x_1, x_2, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_setupImports___lam__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_FileWorker_setupImports___lam__1(x_1, x_2, x_3);
lean_dec_ref(x_3);
lean_dec_ref(x_2);
lean_dec(x_1);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_setupImports(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_20; lean_object* x_21; uint8_t x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_39; 
x_20 = l_Lean_Server_FileWorker_setupImports___closed__0;
x_21 = lean_st_ref_take(x_20);
x_22 = 1;
x_23 = lean_box(x_22);
x_24 = lean_st_ref_set(x_20, x_23);
x_39 = lean_unbox(x_21);
if (x_39 == 0)
{
lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_139; lean_object* x_140; lean_object* x_141; uint8_t x_142; lean_object* x_152; lean_object* x_167; 
lean_inc(x_4);
x_40 = l_Lean_Server_collectImports(x_4);
x_41 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderInfoNotification(x_1, x_40);
x_42 = lean_ctor_get(x_41, 0);
lean_inc_ref(x_42);
x_43 = lean_ctor_get(x_41, 1);
lean_inc(x_43);
if (lean_is_exclusive(x_41)) {
 lean_ctor_release(x_41, 0);
 lean_ctor_release(x_41, 1);
 x_44 = x_41;
} else {
 lean_dec_ref(x_41);
 x_44 = lean_box(0);
}
lean_inc_ref(x_3);
lean_inc_ref(x_1);
x_45 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_setupImports___lam__0___boxed), 4, 2);
lean_closure_set(x_45, 0, x_1);
lean_closure_set(x_45, 1, x_3);
x_46 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_setupImports___lam__1___boxed), 3, 0);
x_47 = l_Lean_Elab_HeaderSyntax_toModuleHeader(x_4);
x_167 = l_Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_setupImports_spec__3(x_43);
if (lean_obj_tag(x_167) == 0)
{
lean_object* x_168; 
lean_dec_ref(x_167);
x_168 = lean_box(0);
x_152 = x_168;
goto block_166;
}
else
{
uint8_t x_169; 
x_169 = !lean_is_exclusive(x_167);
if (x_169 == 0)
{
x_152 = x_167;
goto block_166;
}
else
{
lean_object* x_170; lean_object* x_171; 
x_170 = lean_ctor_get(x_167, 0);
lean_inc(x_170);
lean_dec(x_167);
x_171 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_171, 0, x_170);
x_152 = x_171;
goto block_166;
}
}
block_119:
{
lean_object* x_54; lean_object* x_55; lean_object* x_56; 
if (lean_is_scalar(x_44)) {
 x_54 = lean_alloc_ctor(1, 2, 0);
} else {
 x_54 = x_44;
 lean_ctor_set_tag(x_54, 1);
}
lean_ctor_set(x_54, 0, x_52);
lean_ctor_set(x_54, 1, x_53);
x_55 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_54);
x_56 = l_Std_Channel_Sync_send___redArg(x_3, x_55);
switch (lean_obj_tag(x_48)) {
case 2:
{
lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; uint64_t x_61; lean_object* x_62; lean_object* x_63; size_t x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; 
lean_dec_ref(x_50);
lean_dec_ref(x_47);
lean_dec_ref(x_46);
lean_dec(x_2);
lean_dec_ref(x_1);
x_57 = l_Lean_Server_FileWorker_setupImports___closed__10;
x_58 = l_Lean_Language_diagnosticsOfHeaderError(x_57, x_5);
x_59 = l_Lean_Server_FileWorker_setupImports___closed__11;
x_60 = lean_box(0);
x_61 = 0;
x_62 = l_Lean_Server_FileWorker_setupImports___closed__5;
x_63 = l_Lean_Server_FileWorker_setupImports___closed__6;
x_64 = 5;
lean_inc(x_49);
x_65 = lean_alloc_ctor(0, 4, sizeof(size_t)*1);
lean_ctor_set(x_65, 0, x_63);
lean_ctor_set(x_65, 1, x_62);
lean_ctor_set(x_65, 2, x_49);
lean_ctor_set(x_65, 3, x_49);
lean_ctor_set_usize(x_65, 4, x_64);
x_66 = lean_alloc_ctor(0, 1, 8);
lean_ctor_set(x_66, 0, x_65);
lean_ctor_set_uint64(x_66, sizeof(void*)*1, x_61);
x_67 = lean_alloc_ctor(0, 4, 1);
lean_ctor_set(x_67, 0, x_59);
lean_ctor_set(x_67, 1, x_58);
lean_ctor_set(x_67, 2, x_60);
lean_ctor_set(x_67, 3, x_66);
lean_ctor_set_uint8(x_67, sizeof(void*)*4, x_22);
x_68 = l_Lean_Server_FileWorker_setupImports___closed__9;
x_69 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_69, 0, x_67);
lean_ctor_set(x_69, 1, x_68);
lean_ctor_set(x_69, 2, x_60);
x_70 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_70, 0, x_69);
x_71 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_71, 0, x_70);
return x_71;
}
case 3:
{
uint8_t x_72; 
lean_dec_ref(x_50);
lean_dec_ref(x_47);
lean_dec_ref(x_46);
lean_dec(x_2);
lean_dec_ref(x_1);
x_72 = !lean_is_exclusive(x_48);
if (x_72 == 0)
{
lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; uint64_t x_77; lean_object* x_78; lean_object* x_79; size_t x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; 
x_73 = lean_ctor_get(x_48, 0);
x_74 = l_Lean_Language_diagnosticsOfHeaderError(x_73, x_5);
x_75 = l_Lean_Server_FileWorker_setupImports___closed__11;
x_76 = lean_box(0);
x_77 = 0;
x_78 = l_Lean_Server_FileWorker_setupImports___closed__5;
x_79 = l_Lean_Server_FileWorker_setupImports___closed__6;
x_80 = 5;
lean_inc(x_49);
x_81 = lean_alloc_ctor(0, 4, sizeof(size_t)*1);
lean_ctor_set(x_81, 0, x_79);
lean_ctor_set(x_81, 1, x_78);
lean_ctor_set(x_81, 2, x_49);
lean_ctor_set(x_81, 3, x_49);
lean_ctor_set_usize(x_81, 4, x_80);
x_82 = lean_alloc_ctor(0, 1, 8);
lean_ctor_set(x_82, 0, x_81);
lean_ctor_set_uint64(x_82, sizeof(void*)*1, x_77);
x_83 = lean_alloc_ctor(0, 4, 1);
lean_ctor_set(x_83, 0, x_75);
lean_ctor_set(x_83, 1, x_74);
lean_ctor_set(x_83, 2, x_76);
lean_ctor_set(x_83, 3, x_82);
lean_ctor_set_uint8(x_83, sizeof(void*)*4, x_22);
x_84 = l_Lean_Server_FileWorker_setupImports___closed__9;
x_85 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_85, 0, x_83);
lean_ctor_set(x_85, 1, x_84);
lean_ctor_set(x_85, 2, x_76);
lean_ctor_set_tag(x_48, 0);
lean_ctor_set(x_48, 0, x_85);
x_86 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_86, 0, x_48);
return x_86;
}
else
{
lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; uint64_t x_91; lean_object* x_92; lean_object* x_93; size_t x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; 
x_87 = lean_ctor_get(x_48, 0);
lean_inc(x_87);
lean_dec(x_48);
x_88 = l_Lean_Language_diagnosticsOfHeaderError(x_87, x_5);
x_89 = l_Lean_Server_FileWorker_setupImports___closed__11;
x_90 = lean_box(0);
x_91 = 0;
x_92 = l_Lean_Server_FileWorker_setupImports___closed__5;
x_93 = l_Lean_Server_FileWorker_setupImports___closed__6;
x_94 = 5;
lean_inc(x_49);
x_95 = lean_alloc_ctor(0, 4, sizeof(size_t)*1);
lean_ctor_set(x_95, 0, x_93);
lean_ctor_set(x_95, 1, x_92);
lean_ctor_set(x_95, 2, x_49);
lean_ctor_set(x_95, 3, x_49);
lean_ctor_set_usize(x_95, 4, x_94);
x_96 = lean_alloc_ctor(0, 1, 8);
lean_ctor_set(x_96, 0, x_95);
lean_ctor_set_uint64(x_96, sizeof(void*)*1, x_91);
x_97 = lean_alloc_ctor(0, 4, 1);
lean_ctor_set(x_97, 0, x_89);
lean_ctor_set(x_97, 1, x_88);
lean_ctor_set(x_97, 2, x_90);
lean_ctor_set(x_97, 3, x_96);
lean_ctor_set_uint8(x_97, sizeof(void*)*4, x_22);
x_98 = l_Lean_Server_FileWorker_setupImports___closed__9;
x_99 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_99, 0, x_97);
lean_ctor_set(x_99, 1, x_98);
lean_ctor_set(x_99, 2, x_90);
x_100 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_100, 0, x_99);
x_101 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_101, 0, x_100);
return x_101;
}
}
default: 
{
lean_object* x_102; uint8_t x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; uint8_t x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; uint8_t x_117; 
lean_dec(x_49);
lean_dec(x_48);
lean_dec_ref(x_5);
x_102 = lean_ctor_get(x_50, 1);
lean_inc(x_102);
x_103 = lean_ctor_get_uint8(x_50, sizeof(void*)*7);
x_104 = lean_ctor_get(x_50, 2);
lean_inc(x_104);
x_105 = lean_ctor_get(x_50, 3);
lean_inc(x_105);
x_106 = lean_ctor_get(x_50, 5);
lean_inc_ref(x_106);
x_107 = lean_ctor_get(x_50, 6);
lean_inc(x_107);
lean_dec_ref(x_50);
x_108 = lean_ctor_get(x_1, 1);
lean_inc(x_108);
lean_dec_ref(x_1);
x_109 = lean_ctor_get(x_47, 0);
lean_inc_ref(x_109);
x_110 = lean_ctor_get_uint8(x_47, sizeof(void*)*1);
lean_dec_ref(x_47);
x_111 = l_Lean_LeanOptions_toOptions(x_107);
x_112 = l_Lean_KVMap_mergeBy(x_46, x_2, x_111);
x_113 = l_Lean_Server_FileWorker_setupImports___closed__12;
x_114 = l_Lean_Option_setIfNotSet___at___00Lean_Server_FileWorker_setupImports_spec__0(x_112, x_113, x_22);
x_115 = l_Lean_Server_FileWorker_setupImports___closed__13;
x_116 = l_Lean_Option_set___at___00Lean_Option_setIfNotSet___at___00Lean_Server_FileWorker_setupImports_spec__0_spec__0(x_114, x_115, x_22);
x_117 = lean_strict_or(x_103, x_110);
if (lean_obj_tag(x_104) == 0)
{
x_7 = x_106;
x_8 = x_105;
x_9 = x_117;
x_10 = x_108;
x_11 = lean_box(0);
x_12 = x_102;
x_13 = x_116;
x_14 = x_109;
goto block_19;
}
else
{
lean_object* x_118; 
lean_dec_ref(x_109);
x_118 = lean_ctor_get(x_104, 0);
lean_inc(x_118);
lean_dec_ref(x_104);
x_7 = x_106;
x_8 = x_105;
x_9 = x_117;
x_10 = x_108;
x_11 = lean_box(0);
x_12 = x_102;
x_13 = x_116;
x_14 = x_118;
goto block_19;
}
}
}
}
block_138:
{
lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; 
x_125 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_125, 0, x_123);
lean_ctor_set(x_125, 1, x_124);
x_126 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_125);
lean_inc_ref(x_3);
x_127 = l_Std_Channel_Sync_send___redArg(x_3, x_126);
x_128 = lean_unsigned_to_nat(0u);
x_129 = l_Lean_Server_FileWorker_setupImports___closed__14;
lean_inc_ref(x_1);
x_130 = l_Lean_Server_mkPublishDiagnosticsNotification(x_1, x_129);
x_131 = lean_ctor_get(x_130, 0);
lean_inc_ref(x_131);
x_132 = lean_ctor_get(x_130, 1);
lean_inc(x_132);
lean_dec_ref(x_130);
x_133 = l_Lean_Json_toStructured_x3f___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics_spec__1(x_132);
if (lean_obj_tag(x_133) == 0)
{
lean_object* x_134; 
lean_dec_ref(x_133);
x_134 = lean_box(0);
x_48 = x_120;
x_49 = x_128;
x_50 = x_122;
x_51 = lean_box(0);
x_52 = x_131;
x_53 = x_134;
goto block_119;
}
else
{
uint8_t x_135; 
x_135 = !lean_is_exclusive(x_133);
if (x_135 == 0)
{
x_48 = x_120;
x_49 = x_128;
x_50 = x_122;
x_51 = lean_box(0);
x_52 = x_131;
x_53 = x_133;
goto block_119;
}
else
{
lean_object* x_136; lean_object* x_137; 
x_136 = lean_ctor_get(x_133, 0);
lean_inc(x_136);
lean_dec(x_133);
x_137 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_137, 0, x_136);
x_48 = x_120;
x_49 = x_128;
x_50 = x_122;
x_51 = lean_box(0);
x_52 = x_131;
x_53 = x_137;
goto block_119;
}
}
}
block_151:
{
lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; 
x_143 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderSetupInfoNotification(x_1, x_142);
x_144 = lean_ctor_get(x_143, 0);
lean_inc_ref(x_144);
x_145 = lean_ctor_get(x_143, 1);
lean_inc(x_145);
lean_dec_ref(x_143);
x_146 = l_Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_setupImports_spec__2(x_145);
if (lean_obj_tag(x_146) == 0)
{
lean_object* x_147; 
lean_dec_ref(x_146);
x_147 = lean_box(0);
x_120 = x_139;
x_121 = lean_box(0);
x_122 = x_141;
x_123 = x_144;
x_124 = x_147;
goto block_138;
}
else
{
uint8_t x_148; 
x_148 = !lean_is_exclusive(x_146);
if (x_148 == 0)
{
x_120 = x_139;
x_121 = lean_box(0);
x_122 = x_141;
x_123 = x_144;
x_124 = x_146;
goto block_138;
}
else
{
lean_object* x_149; lean_object* x_150; 
x_149 = lean_ctor_get(x_146, 0);
lean_inc(x_149);
lean_dec(x_146);
x_150 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_150, 0, x_149);
x_120 = x_139;
x_121 = lean_box(0);
x_122 = x_141;
x_123 = x_144;
x_124 = x_150;
goto block_138;
}
}
}
block_166:
{
lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; 
x_153 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_153, 0, x_42);
lean_ctor_set(x_153, 1, x_152);
x_154 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_153);
lean_inc_ref(x_3);
x_155 = l_Std_Channel_Sync_send___redArg(x_3, x_154);
lean_inc_ref(x_47);
x_156 = l_Lean_Server_FileWorker_setupFile(x_1, x_47, x_45);
if (lean_obj_tag(x_156) == 0)
{
lean_object* x_157; lean_object* x_158; 
x_157 = lean_ctor_get(x_156, 0);
lean_inc(x_157);
lean_dec_ref(x_156);
x_158 = lean_ctor_get(x_157, 0);
lean_inc(x_158);
if (lean_obj_tag(x_158) == 2)
{
lean_object* x_159; 
lean_dec(x_21);
x_159 = lean_ctor_get(x_157, 1);
lean_inc_ref(x_159);
lean_dec(x_157);
x_139 = x_158;
x_140 = lean_box(0);
x_141 = x_159;
x_142 = x_22;
goto block_151;
}
else
{
if (lean_obj_tag(x_158) == 3)
{
lean_object* x_160; 
lean_dec(x_21);
x_160 = lean_ctor_get(x_157, 1);
lean_inc_ref(x_160);
lean_dec(x_157);
x_139 = x_158;
x_140 = lean_box(0);
x_141 = x_160;
x_142 = x_22;
goto block_151;
}
else
{
lean_object* x_161; uint8_t x_162; 
x_161 = lean_ctor_get(x_157, 1);
lean_inc_ref(x_161);
lean_dec(x_157);
x_162 = lean_unbox(x_21);
lean_dec(x_21);
x_139 = x_158;
x_140 = lean_box(0);
x_141 = x_161;
x_142 = x_162;
goto block_151;
}
}
}
else
{
uint8_t x_163; 
lean_dec_ref(x_47);
lean_dec_ref(x_46);
lean_dec(x_44);
lean_dec(x_21);
lean_dec_ref(x_5);
lean_dec_ref(x_3);
lean_dec(x_2);
lean_dec_ref(x_1);
x_163 = !lean_is_exclusive(x_156);
if (x_163 == 0)
{
return x_156;
}
else
{
lean_object* x_164; lean_object* x_165; 
x_164 = lean_ctor_get(x_156, 0);
lean_inc(x_164);
lean_dec(x_156);
x_165 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_165, 0, x_164);
return x_165;
}
}
}
}
else
{
uint32_t x_172; lean_object* x_173; uint8_t x_174; 
lean_dec_ref(x_5);
lean_dec(x_4);
lean_dec_ref(x_3);
lean_dec(x_2);
lean_dec_ref(x_1);
x_172 = 200;
x_173 = l_IO_sleep(x_172);
x_174 = lean_io_check_canceled();
if (x_174 == 0)
{
uint8_t x_175; lean_object* x_176; 
x_175 = 2;
x_176 = lean_io_force_exit(x_175);
if (lean_obj_tag(x_176) == 0)
{
lean_dec_ref(x_176);
x_25 = lean_box(0);
goto block_38;
}
else
{
uint8_t x_177; 
lean_dec(x_21);
x_177 = !lean_is_exclusive(x_176);
if (x_177 == 0)
{
return x_176;
}
else
{
lean_object* x_178; lean_object* x_179; 
x_178 = lean_ctor_get(x_176, 0);
lean_inc(x_178);
lean_dec(x_176);
x_179 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_179, 0, x_178);
return x_179;
}
}
}
else
{
x_25 = lean_box(0);
goto block_38;
}
}
block_19:
{
uint32_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; 
x_15 = 0;
x_16 = lean_alloc_ctor(0, 6, 5);
lean_ctor_set(x_16, 0, x_10);
lean_ctor_set(x_16, 1, x_12);
lean_ctor_set(x_16, 2, x_14);
lean_ctor_set(x_16, 3, x_13);
lean_ctor_set(x_16, 4, x_8);
lean_ctor_set(x_16, 5, x_7);
lean_ctor_set_uint8(x_16, sizeof(void*)*6 + 4, x_9);
lean_ctor_set_uint32(x_16, sizeof(void*)*6, x_15);
x_17 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_17, 0, x_16);
x_18 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_18, 0, x_17);
return x_18;
}
block_38:
{
lean_object* x_26; uint8_t x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; uint8_t x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; 
x_26 = l_Lean_Server_FileWorker_setupImports___closed__3;
x_27 = lean_unbox(x_21);
x_28 = l_Lean_Name_toString(x_26, x_27);
x_29 = l_Lean_Server_FileWorker_setupImports___closed__4;
x_30 = lean_box(0);
x_31 = l_Lean_Server_FileWorker_setupImports___closed__8;
x_32 = lean_alloc_ctor(0, 4, 1);
lean_ctor_set(x_32, 0, x_28);
lean_ctor_set(x_32, 1, x_29);
lean_ctor_set(x_32, 2, x_30);
lean_ctor_set(x_32, 3, x_31);
x_33 = lean_unbox(x_21);
lean_dec(x_21);
lean_ctor_set_uint8(x_32, sizeof(void*)*4, x_33);
x_34 = l_Lean_Server_FileWorker_setupImports___closed__9;
x_35 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_35, 0, x_32);
lean_ctor_set(x_35, 1, x_34);
lean_ctor_set(x_35, 2, x_30);
x_36 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_36, 0, x_35);
x_37 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_37, 0, x_36);
return x_37;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Option_set___at___00Lean_Option_setIfNotSet___at___00Lean_Server_FileWorker_setupImports_spec__0_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; lean_object* x_5; 
x_4 = lean_unbox(x_3);
x_5 = l_Lean_Option_set___at___00Lean_Option_setIfNotSet___at___00Lean_Server_FileWorker_setupImports_spec__0_spec__0(x_1, x_2, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Option_setIfNotSet___at___00Lean_Server_FileWorker_setupImports_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; lean_object* x_5; 
x_4 = lean_unbox(x_3);
x_5 = l_Lean_Option_setIfNotSet___at___00Lean_Server_FileWorker_setupImports_spec__0(x_1, x_2, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_setupImports___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_Server_FileWorker_setupImports(x_1, x_2, x_3, x_4, x_5);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Nat_cast___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel_spec__0(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__0(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; 
x_2 = l_Lean_Json_Structured_toJson(x_1);
x_3 = l_Lean_Lsp_instFromJsonLeanIleanInfoParams_fromJson(x_2);
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_4; 
lean_dec_ref(x_3);
x_4 = lean_box(0);
return x_4;
}
else
{
uint8_t x_5; 
x_5 = !lean_is_exclusive(x_3);
if (x_5 == 0)
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; 
x_6 = lean_ctor_get(x_3, 0);
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
lean_dec(x_6);
x_8 = lean_nat_to_int(x_7);
lean_ctor_set(x_3, 0, x_8);
return x_3;
}
else
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_9 = lean_ctor_get(x_3, 0);
lean_inc(x_9);
lean_dec(x_3);
x_10 = lean_ctor_get(x_9, 0);
lean_inc(x_10);
lean_dec(x_9);
x_11 = lean_nat_to_int(x_10);
x_12 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_12, 0, x_11);
return x_12;
}
}
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("textDocument/publishDiagnostics", 31, 31);
return x_1;
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("$/lean/fileProgress", 19, 19);
return x_1;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_13; lean_object* x_18; 
x_6 = lean_ctor_get(x_4, 0);
lean_inc(x_6);
x_7 = lean_ctor_get(x_4, 1);
lean_inc_ref(x_7);
lean_dec_ref(x_4);
if (lean_obj_tag(x_6) == 1)
{
lean_object* x_21; 
x_21 = lean_ctor_get(x_6, 0);
lean_inc(x_21);
lean_dec_ref(x_6);
if (lean_obj_tag(x_21) == 1)
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; 
x_22 = lean_ctor_get(x_21, 0);
lean_inc_ref(x_22);
x_23 = lean_ctor_get(x_21, 1);
lean_inc(x_23);
lean_dec_ref(x_21);
x_24 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1___closed__0;
x_25 = lean_string_dec_eq(x_22, x_24);
if (x_25 == 0)
{
lean_object* x_26; uint8_t x_27; 
x_26 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1___closed__1;
x_27 = lean_string_dec_eq(x_22, x_26);
if (x_27 == 0)
{
lean_object* x_28; uint8_t x_29; 
x_28 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoUpdateNotification___closed__0;
x_29 = lean_string_dec_eq(x_22, x_28);
if (x_29 == 0)
{
lean_object* x_30; uint8_t x_31; 
x_30 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoFinalNotification___closed__0;
x_31 = lean_string_dec_eq(x_22, x_30);
lean_dec_ref(x_22);
if (x_31 == 0)
{
lean_dec(x_23);
lean_dec_ref(x_3);
x_8 = lean_box(0);
goto block_12;
}
else
{
if (lean_obj_tag(x_23) == 1)
{
lean_object* x_32; lean_object* x_33; 
x_32 = lean_ctor_get(x_23, 0);
lean_inc(x_32);
lean_dec_ref(x_23);
x_33 = lean_apply_1(x_3, x_32);
x_18 = x_33;
goto block_20;
}
else
{
lean_dec(x_23);
lean_dec_ref(x_3);
x_8 = lean_box(0);
goto block_12;
}
}
}
else
{
lean_dec_ref(x_22);
if (lean_obj_tag(x_23) == 1)
{
lean_object* x_34; lean_object* x_35; 
x_34 = lean_ctor_get(x_23, 0);
lean_inc(x_34);
lean_dec_ref(x_23);
x_35 = lean_apply_1(x_3, x_34);
x_18 = x_35;
goto block_20;
}
else
{
lean_dec(x_23);
lean_dec_ref(x_3);
x_8 = lean_box(0);
goto block_12;
}
}
}
else
{
lean_dec_ref(x_22);
lean_dec_ref(x_3);
if (lean_obj_tag(x_23) == 1)
{
lean_object* x_36; lean_object* x_37; lean_object* x_38; 
x_36 = lean_ctor_get(x_23, 0);
lean_inc(x_36);
lean_dec_ref(x_23);
x_37 = l_Lean_Json_Structured_toJson(x_36);
x_38 = l_Lean_Lsp_instFromJsonLeanFileProgressParams_fromJson(x_37);
if (lean_obj_tag(x_38) == 0)
{
lean_dec_ref(x_38);
x_8 = lean_box(0);
goto block_12;
}
else
{
lean_object* x_39; lean_object* x_40; lean_object* x_41; 
x_39 = lean_ctor_get(x_38, 0);
lean_inc(x_39);
lean_dec_ref(x_38);
x_40 = lean_ctor_get(x_39, 0);
lean_inc_ref(x_40);
lean_dec(x_39);
x_41 = lean_ctor_get(x_40, 1);
lean_inc(x_41);
lean_dec_ref(x_40);
if (lean_obj_tag(x_41) == 0)
{
x_8 = lean_box(0);
goto block_12;
}
else
{
lean_object* x_42; lean_object* x_43; 
x_42 = lean_ctor_get(x_41, 0);
lean_inc(x_42);
lean_dec_ref(x_41);
x_43 = lean_nat_to_int(x_42);
x_13 = x_43;
goto block_17;
}
}
}
else
{
lean_dec(x_23);
x_8 = lean_box(0);
goto block_12;
}
}
}
else
{
lean_dec_ref(x_22);
lean_dec_ref(x_3);
if (lean_obj_tag(x_23) == 1)
{
lean_object* x_44; lean_object* x_45; lean_object* x_46; 
x_44 = lean_ctor_get(x_23, 0);
lean_inc(x_44);
lean_dec_ref(x_23);
x_45 = l_Lean_Json_Structured_toJson(x_44);
x_46 = l_Lean_Lsp_instFromJsonPublishDiagnosticsParams_fromJson(x_45);
if (lean_obj_tag(x_46) == 0)
{
lean_dec_ref(x_46);
x_8 = lean_box(0);
goto block_12;
}
else
{
lean_object* x_47; lean_object* x_48; 
x_47 = lean_ctor_get(x_46, 0);
lean_inc(x_47);
lean_dec_ref(x_46);
x_48 = lean_ctor_get(x_47, 1);
lean_inc(x_48);
lean_dec(x_47);
x_18 = x_48;
goto block_20;
}
}
else
{
lean_dec(x_23);
x_8 = lean_box(0);
goto block_12;
}
}
}
else
{
lean_dec(x_21);
lean_dec_ref(x_3);
x_8 = lean_box(0);
goto block_12;
}
}
else
{
lean_dec(x_6);
lean_dec_ref(x_3);
x_8 = lean_box(0);
goto block_12;
}
block_12:
{
lean_object* x_9; 
x_9 = l_IO_FS_Stream_writeSerializedLspMessage(x_1, x_7);
lean_dec_ref(x_7);
if (lean_obj_tag(x_9) == 0)
{
lean_object* x_10; 
x_10 = lean_ctor_get(x_9, 0);
lean_inc(x_10);
lean_dec_ref(x_9);
return x_10;
}
else
{
lean_object* x_11; 
lean_dec_ref(x_9);
x_11 = lean_box(0);
return x_11;
}
}
block_17:
{
lean_object* x_14; uint8_t x_15; 
x_14 = lean_st_ref_get(x_2);
x_15 = lean_int_dec_lt(x_13, x_14);
lean_dec(x_14);
lean_dec(x_13);
if (x_15 == 0)
{
x_8 = lean_box(0);
goto block_12;
}
else
{
lean_object* x_16; 
lean_dec_ref(x_7);
lean_dec_ref(x_1);
x_16 = lean_box(0);
return x_16;
}
}
block_20:
{
if (lean_obj_tag(x_18) == 1)
{
lean_object* x_19; 
x_19 = lean_ctor_get(x_18, 0);
lean_inc(x_19);
lean_dec_ref(x_18);
x_13 = x_19;
goto block_17;
}
else
{
lean_dec(x_18);
x_8 = lean_box(0);
goto block_12;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1(x_1, x_2, x_3, x_4);
lean_dec(x_2);
return x_6;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; 
x_4 = lean_box(0);
x_5 = l_Std_CloseableChannel_new___redArg(x_4);
x_6 = lean_alloc_closure((void*)(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__0), 1, 0);
x_7 = lean_alloc_closure((void*)(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1___boxed), 5, 3);
lean_closure_set(x_7, 0, x_1);
lean_closure_set(x_7, 1, x_2);
lean_closure_set(x_7, 2, x_6);
x_8 = l_Lean_Server_FileWorker_instInhabitedOutputMessage_default;
x_9 = lean_unsigned_to_nat(9u);
lean_inc_ref(x_5);
x_10 = l_Std_Channel_forAsync___redArg(x_8, x_7, x_5, x_9);
lean_dec_ref(x_10);
x_11 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_11, 0, x_5);
return x_11;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel(x_1, x_2);
return x_4;
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_getImportClosure_x3f___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_getImportClosure_x3f(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = lean_ctor_get(x_1, 4);
lean_inc(x_2);
lean_dec_ref(x_1);
if (lean_obj_tag(x_2) == 1)
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_3 = lean_ctor_get(x_2, 0);
lean_inc(x_3);
lean_dec_ref(x_2);
x_4 = lean_ctor_get(x_3, 1);
lean_inc_ref(x_4);
lean_dec(x_3);
x_5 = l_Lean_Language_SnapshotTask_get___redArg(x_4);
x_6 = lean_ctor_get(x_5, 2);
lean_inc(x_6);
lean_dec(x_5);
if (lean_obj_tag(x_6) == 1)
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
lean_dec_ref(x_6);
x_8 = lean_ctor_get(x_7, 0);
lean_inc_ref(x_8);
lean_dec(x_7);
x_9 = lean_ctor_get(x_8, 0);
lean_inc_ref(x_9);
lean_dec_ref(x_8);
x_10 = l_Lean_Environment_allImportedModuleNames(x_9);
lean_dec_ref(x_9);
return x_10;
}
else
{
lean_object* x_11; 
lean_dec(x_6);
x_11 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_getImportClosure_x3f___closed__0;
return x_11;
}
}
else
{
lean_object* x_12; 
lean_dec(x_2);
x_12 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_getImportClosure_x3f___closed__0;
return x_12;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_initializeWorker_spec__4(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; 
x_2 = l_Lean_Lsp_instToJsonLeanImportClosureParams_toJson(x_1);
x_3 = l_Lean_Json_Structured_fromJson_x3f(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initializeWorker_spec__1(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; 
x_5 = lean_usize_dec_lt(x_3, x_2);
if (x_5 == 0)
{
return x_4;
}
else
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; size_t x_10; size_t x_11; 
x_6 = lean_array_uget(x_1, x_3);
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
x_8 = lean_ctor_get(x_6, 1);
lean_inc(x_8);
lean_dec(x_6);
x_9 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__2___redArg(x_7, x_8, x_4);
x_10 = 1;
x_11 = lean_usize_add(x_3, x_10);
x_3 = x_11;
x_4 = x_9;
goto _start;
}
}
}
static lean_object* _init_l_Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2_spec__2(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) {
_start:
{
uint8_t x_6; 
x_6 = lean_usize_dec_eq(x_2, x_3);
if (x_6 == 0)
{
lean_object* x_7; lean_object* x_8; 
x_7 = lean_array_uget(x_1, x_2);
x_8 = l_Lean_Server_documentUriFromModule_x3f(x_7);
if (lean_obj_tag(x_8) == 0)
{
lean_object* x_9; lean_object* x_10; 
x_9 = lean_ctor_get(x_8, 0);
lean_inc(x_9);
lean_dec_ref(x_8);
if (lean_obj_tag(x_9) == 0)
{
x_10 = x_4;
goto block_14;
}
else
{
lean_object* x_15; lean_object* x_16; 
x_15 = lean_ctor_get(x_9, 0);
lean_inc(x_15);
lean_dec_ref(x_9);
x_16 = lean_array_push(x_4, x_15);
x_10 = x_16;
goto block_14;
}
block_14:
{
size_t x_11; size_t x_12; 
x_11 = 1;
x_12 = lean_usize_add(x_2, x_11);
x_2 = x_12;
x_4 = x_10;
goto _start;
}
}
else
{
uint8_t x_17; 
lean_dec_ref(x_4);
x_17 = !lean_is_exclusive(x_8);
if (x_17 == 0)
{
return x_8;
}
else
{
lean_object* x_18; lean_object* x_19; 
x_18 = lean_ctor_get(x_8, 0);
lean_inc(x_18);
lean_dec(x_8);
x_19 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_19, 0, x_18);
return x_19;
}
}
}
else
{
lean_object* x_20; 
x_20 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_20, 0, x_4);
return x_20;
}
}
}
LEAN_EXPORT lean_object* l_Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; uint8_t x_6; 
x_5 = l_Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2___closed__0;
x_6 = lean_nat_dec_lt(x_2, x_3);
if (x_6 == 0)
{
lean_object* x_7; 
x_7 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_7, 0, x_5);
return x_7;
}
else
{
lean_object* x_8; uint8_t x_9; 
x_8 = lean_array_get_size(x_1);
x_9 = lean_nat_dec_le(x_3, x_8);
lean_dec(x_8);
if (x_9 == 0)
{
lean_object* x_10; 
x_10 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_10, 0, x_5);
return x_10;
}
else
{
size_t x_11; size_t x_12; lean_object* x_13; 
x_11 = lean_usize_of_nat(x_2);
x_12 = lean_usize_of_nat(x_3);
x_13 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2_spec__2(x_1, x_11, x_12, x_5);
return x_13;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Server_FileWorker_initializeWorker_spec__0(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5) {
_start:
{
uint8_t x_6; 
x_6 = lean_usize_dec_lt(x_4, x_3);
if (x_6 == 0)
{
lean_dec(x_2);
lean_dec(x_1);
return x_5;
}
else
{
lean_object* x_7; uint8_t x_8; 
x_7 = lean_array_uget(x_5, x_4);
x_8 = !lean_is_exclusive(x_7);
if (x_8 == 0)
{
lean_object* x_9; uint8_t x_10; 
x_9 = lean_ctor_get(x_7, 1);
x_10 = !lean_is_exclusive(x_9);
if (x_10 == 0)
{
lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; lean_object* x_20; 
x_11 = lean_ctor_get(x_7, 0);
x_12 = lean_ctor_get(x_9, 0);
x_13 = lean_ctor_get(x_9, 1);
lean_dec(x_13);
x_14 = lean_unsigned_to_nat(0u);
x_15 = lean_array_uset(x_5, x_4, x_14);
lean_inc(x_2);
lean_inc(x_1);
lean_ctor_set(x_7, 1, x_2);
lean_ctor_set(x_7, 0, x_1);
x_16 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_16, 0, x_7);
lean_inc(x_2);
x_17 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_17, 0, x_12);
lean_ctor_set(x_17, 1, x_2);
lean_ctor_set(x_17, 2, x_16);
lean_ctor_set(x_9, 1, x_17);
lean_ctor_set(x_9, 0, x_11);
x_18 = 1;
x_19 = lean_usize_add(x_4, x_18);
x_20 = lean_array_uset(x_15, x_4, x_9);
x_4 = x_19;
x_5 = x_20;
goto _start;
}
else
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; size_t x_29; size_t x_30; lean_object* x_31; 
x_22 = lean_ctor_get(x_7, 0);
x_23 = lean_ctor_get(x_9, 0);
lean_inc(x_23);
lean_dec(x_9);
x_24 = lean_unsigned_to_nat(0u);
x_25 = lean_array_uset(x_5, x_4, x_24);
lean_inc(x_2);
lean_inc(x_1);
lean_ctor_set(x_7, 1, x_2);
lean_ctor_set(x_7, 0, x_1);
x_26 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_26, 0, x_7);
lean_inc(x_2);
x_27 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_27, 0, x_23);
lean_ctor_set(x_27, 1, x_2);
lean_ctor_set(x_27, 2, x_26);
x_28 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_28, 0, x_22);
lean_ctor_set(x_28, 1, x_27);
x_29 = 1;
x_30 = lean_usize_add(x_4, x_29);
x_31 = lean_array_uset(x_25, x_4, x_28);
x_4 = x_30;
x_5 = x_31;
goto _start;
}
}
else
{
lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; size_t x_43; size_t x_44; lean_object* x_45; 
x_33 = lean_ctor_get(x_7, 1);
x_34 = lean_ctor_get(x_7, 0);
lean_inc(x_33);
lean_inc(x_34);
lean_dec(x_7);
x_35 = lean_ctor_get(x_33, 0);
lean_inc(x_35);
if (lean_is_exclusive(x_33)) {
 lean_ctor_release(x_33, 0);
 lean_ctor_release(x_33, 1);
 x_36 = x_33;
} else {
 lean_dec_ref(x_33);
 x_36 = lean_box(0);
}
x_37 = lean_unsigned_to_nat(0u);
x_38 = lean_array_uset(x_5, x_4, x_37);
lean_inc(x_2);
lean_inc(x_1);
x_39 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_39, 0, x_1);
lean_ctor_set(x_39, 1, x_2);
x_40 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_40, 0, x_39);
lean_inc(x_2);
x_41 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_41, 0, x_35);
lean_ctor_set(x_41, 1, x_2);
lean_ctor_set(x_41, 2, x_40);
if (lean_is_scalar(x_36)) {
 x_42 = lean_alloc_ctor(0, 2, 0);
} else {
 x_42 = x_36;
}
lean_ctor_set(x_42, 0, x_34);
lean_ctor_set(x_42, 1, x_41);
x_43 = 1;
x_44 = lean_usize_add(x_4, x_43);
x_45 = lean_array_uset(x_38, x_4, x_42);
x_4 = x_44;
x_5 = x_45;
goto _start;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initializeWorker___lam__0(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_getImportClosure_x3f(x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initializeWorker___lam__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; 
x_5 = l_IO_lazyPure___redArg(x_1);
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; 
x_6 = lean_ctor_get(x_5, 0);
lean_inc(x_6);
lean_dec_ref(x_5);
x_7 = lean_array_get_size(x_6);
x_8 = l_Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2(x_6, x_2, x_7);
lean_dec(x_7);
lean_dec(x_6);
if (lean_obj_tag(x_8) == 0)
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_21; 
x_9 = lean_ctor_get(x_8, 0);
lean_inc(x_9);
if (lean_is_exclusive(x_8)) {
 lean_ctor_release(x_8, 0);
 x_10 = x_8;
} else {
 lean_dec_ref(x_8);
 x_10 = lean_box(0);
}
x_11 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkImportClosureNotification(x_9);
x_12 = lean_ctor_get(x_11, 0);
lean_inc_ref(x_12);
x_13 = lean_ctor_get(x_11, 1);
lean_inc(x_13);
if (lean_is_exclusive(x_11)) {
 lean_ctor_release(x_11, 0);
 lean_ctor_release(x_11, 1);
 x_14 = x_11;
} else {
 lean_dec_ref(x_11);
 x_14 = lean_box(0);
}
x_21 = l_Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_initializeWorker_spec__4(x_13);
if (lean_obj_tag(x_21) == 0)
{
lean_object* x_22; 
lean_dec_ref(x_21);
x_22 = lean_box(0);
x_15 = x_22;
goto block_20;
}
else
{
uint8_t x_23; 
x_23 = !lean_is_exclusive(x_21);
if (x_23 == 0)
{
x_15 = x_21;
goto block_20;
}
else
{
lean_object* x_24; lean_object* x_25; 
x_24 = lean_ctor_get(x_21, 0);
lean_inc(x_24);
lean_dec(x_21);
x_25 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_25, 0, x_24);
x_15 = x_25;
goto block_20;
}
}
block_20:
{
lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; 
if (lean_is_scalar(x_14)) {
 x_16 = lean_alloc_ctor(1, 2, 0);
} else {
 x_16 = x_14;
 lean_ctor_set_tag(x_16, 1);
}
lean_ctor_set(x_16, 0, x_12);
lean_ctor_set(x_16, 1, x_15);
x_17 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_16);
x_18 = l_Std_Channel_send___redArg(x_3, x_17);
if (lean_is_scalar(x_10)) {
 x_19 = lean_alloc_ctor(0, 1, 0);
} else {
 x_19 = x_10;
}
lean_ctor_set(x_19, 0, x_18);
return x_19;
}
}
else
{
uint8_t x_26; 
lean_dec_ref(x_3);
x_26 = !lean_is_exclusive(x_8);
if (x_26 == 0)
{
return x_8;
}
else
{
lean_object* x_27; lean_object* x_28; 
x_27 = lean_ctor_get(x_8, 0);
lean_inc(x_27);
lean_dec(x_8);
x_28 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_28, 0, x_27);
return x_28;
}
}
}
else
{
uint8_t x_29; 
lean_dec_ref(x_3);
x_29 = !lean_is_exclusive(x_5);
if (x_29 == 0)
{
return x_5;
}
else
{
lean_object* x_30; lean_object* x_31; 
x_30 = lean_ctor_get(x_5, 0);
lean_inc(x_30);
lean_dec(x_5);
x_31 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_31, 0, x_30);
return x_31;
}
}
}
}
static lean_object* _init_l_Lean_Server_FileWorker_initializeWorker___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_initializeWorker___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = l_Array_empty(lean_box(0));
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initializeWorker___lam__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_initializeWorker___lam__1(x_1, x_2, x_3);
lean_dec(x_2);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initializeWorker(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint8_t x_7; lean_object* x_78; 
x_78 = lean_ctor_get(x_4, 3);
if (lean_obj_tag(x_78) == 0)
{
goto block_77;
}
else
{
lean_object* x_79; lean_object* x_80; 
x_79 = lean_ctor_get(x_78, 0);
x_80 = lean_ctor_get(x_79, 0);
if (lean_obj_tag(x_80) == 0)
{
goto block_77;
}
else
{
lean_object* x_81; uint8_t x_82; 
x_81 = lean_ctor_get(x_80, 0);
x_82 = lean_unbox(x_81);
x_7 = x_82;
goto block_75;
}
}
block_75:
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; 
x_8 = lean_unsigned_to_nat(0u);
x_9 = l_Lean_Server_FileWorker_initializeWorker___closed__0;
x_10 = lean_st_mk_ref(x_9);
x_11 = lean_st_mk_ref(x_9);
x_12 = l_Lean_Server_FileWorker_initializeWorker___closed__1;
x_13 = lean_st_mk_ref(x_12);
x_14 = lean_box(1);
x_15 = lean_st_mk_ref(x_14);
lean_inc(x_10);
x_16 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel(x_2, x_10);
x_17 = lean_ctor_get(x_16, 0);
lean_inc(x_17);
lean_dec_ref(x_16);
x_18 = lean_io_mono_ms_now();
x_19 = l_Lean_Server_partialLspRequestHandlerMethods();
if (lean_obj_tag(x_19) == 0)
{
uint8_t x_20; 
x_20 = !lean_is_exclusive(x_19);
if (x_20 == 0)
{
lean_object* x_21; size_t x_22; size_t x_23; lean_object* x_24; size_t x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; 
x_21 = lean_ctor_get(x_19, 0);
x_22 = lean_array_size(x_21);
x_23 = 0;
x_24 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Server_FileWorker_initializeWorker_spec__0(x_18, x_8, x_22, x_23, x_21);
x_25 = lean_array_size(x_24);
x_26 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initializeWorker_spec__1(x_24, x_25, x_23, x_14);
lean_dec_ref(x_24);
x_27 = lean_st_mk_ref(x_26);
lean_inc(x_17);
lean_inc(x_5);
lean_inc_ref(x_1);
x_28 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_setupImports___boxed), 6, 3);
lean_closure_set(x_28, 0, x_1);
lean_closure_set(x_28, 1, x_5);
lean_closure_set(x_28, 2, x_17);
x_29 = lean_alloc_closure((void*)(l_Lean_Language_Lean_process___boxed), 4, 1);
lean_closure_set(x_29, 0, x_28);
x_30 = l_Lean_Language_mkIncrementalProcessor___redArg(x_29);
lean_inc_ref(x_1);
x_31 = l_Lean_Server_DocumentMeta_mkInputContext(x_1);
lean_inc_ref(x_30);
x_32 = lean_apply_2(x_30, x_31, lean_box(0));
lean_inc_ref(x_32);
x_33 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_initializeWorker___lam__0), 2, 1);
lean_closure_set(x_33, 0, x_32);
lean_inc(x_17);
x_34 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_initializeWorker___lam__1___boxed), 4, 3);
lean_closure_set(x_34, 0, x_33);
lean_closure_set(x_34, 1, x_8);
lean_closure_set(x_34, 2, x_17);
x_35 = l_Lean_Server_ServerTask_IO_asTask___redArg(x_34);
lean_dec_ref(x_35);
x_36 = lean_st_mk_ref(x_12);
x_37 = l_IO_CancelToken_new();
x_38 = lean_alloc_ctor(0, 10, 1);
lean_ctor_set(x_38, 0, x_17);
lean_ctor_set(x_38, 1, x_10);
lean_ctor_set(x_38, 2, x_11);
lean_ctor_set(x_38, 3, x_13);
lean_ctor_set(x_38, 4, x_27);
lean_ctor_set(x_38, 5, x_15);
lean_ctor_set(x_38, 6, x_3);
lean_ctor_set(x_38, 7, x_4);
lean_ctor_set(x_38, 8, x_30);
lean_ctor_set(x_38, 9, x_5);
lean_ctor_set_uint8(x_38, sizeof(void*)*10, x_7);
lean_inc_ref(x_32);
x_39 = l_Lean_Server_FileWorker_EditableDocumentCore___private__1(x_32);
x_40 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_40, 0, x_1);
lean_ctor_set(x_40, 1, x_32);
lean_ctor_set(x_40, 2, x_39);
lean_ctor_set(x_40, 3, x_36);
lean_inc(x_37);
lean_inc_ref(x_40);
lean_inc_ref(x_38);
x_41 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots(x_38, x_40, x_37);
x_42 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_42, 0, x_40);
lean_ctor_set(x_42, 1, x_41);
x_43 = lean_box(0);
x_44 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_44, 0, x_42);
lean_ctor_set(x_44, 1, x_37);
lean_ctor_set(x_44, 2, x_43);
lean_ctor_set(x_44, 3, x_14);
lean_ctor_set(x_44, 4, x_14);
x_45 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_45, 0, x_38);
lean_ctor_set(x_45, 1, x_44);
lean_ctor_set(x_19, 0, x_45);
return x_19;
}
else
{
lean_object* x_46; size_t x_47; size_t x_48; lean_object* x_49; size_t x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; 
x_46 = lean_ctor_get(x_19, 0);
lean_inc(x_46);
lean_dec(x_19);
x_47 = lean_array_size(x_46);
x_48 = 0;
x_49 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Server_FileWorker_initializeWorker_spec__0(x_18, x_8, x_47, x_48, x_46);
x_50 = lean_array_size(x_49);
x_51 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initializeWorker_spec__1(x_49, x_50, x_48, x_14);
lean_dec_ref(x_49);
x_52 = lean_st_mk_ref(x_51);
lean_inc(x_17);
lean_inc(x_5);
lean_inc_ref(x_1);
x_53 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_setupImports___boxed), 6, 3);
lean_closure_set(x_53, 0, x_1);
lean_closure_set(x_53, 1, x_5);
lean_closure_set(x_53, 2, x_17);
x_54 = lean_alloc_closure((void*)(l_Lean_Language_Lean_process___boxed), 4, 1);
lean_closure_set(x_54, 0, x_53);
x_55 = l_Lean_Language_mkIncrementalProcessor___redArg(x_54);
lean_inc_ref(x_1);
x_56 = l_Lean_Server_DocumentMeta_mkInputContext(x_1);
lean_inc_ref(x_55);
x_57 = lean_apply_2(x_55, x_56, lean_box(0));
lean_inc_ref(x_57);
x_58 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_initializeWorker___lam__0), 2, 1);
lean_closure_set(x_58, 0, x_57);
lean_inc(x_17);
x_59 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_initializeWorker___lam__1___boxed), 4, 3);
lean_closure_set(x_59, 0, x_58);
lean_closure_set(x_59, 1, x_8);
lean_closure_set(x_59, 2, x_17);
x_60 = l_Lean_Server_ServerTask_IO_asTask___redArg(x_59);
lean_dec_ref(x_60);
x_61 = lean_st_mk_ref(x_12);
x_62 = l_IO_CancelToken_new();
x_63 = lean_alloc_ctor(0, 10, 1);
lean_ctor_set(x_63, 0, x_17);
lean_ctor_set(x_63, 1, x_10);
lean_ctor_set(x_63, 2, x_11);
lean_ctor_set(x_63, 3, x_13);
lean_ctor_set(x_63, 4, x_52);
lean_ctor_set(x_63, 5, x_15);
lean_ctor_set(x_63, 6, x_3);
lean_ctor_set(x_63, 7, x_4);
lean_ctor_set(x_63, 8, x_55);
lean_ctor_set(x_63, 9, x_5);
lean_ctor_set_uint8(x_63, sizeof(void*)*10, x_7);
lean_inc_ref(x_57);
x_64 = l_Lean_Server_FileWorker_EditableDocumentCore___private__1(x_57);
x_65 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_65, 0, x_1);
lean_ctor_set(x_65, 1, x_57);
lean_ctor_set(x_65, 2, x_64);
lean_ctor_set(x_65, 3, x_61);
lean_inc(x_62);
lean_inc_ref(x_65);
lean_inc_ref(x_63);
x_66 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots(x_63, x_65, x_62);
x_67 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_67, 0, x_65);
lean_ctor_set(x_67, 1, x_66);
x_68 = lean_box(0);
x_69 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_69, 0, x_67);
lean_ctor_set(x_69, 1, x_62);
lean_ctor_set(x_69, 2, x_68);
lean_ctor_set(x_69, 3, x_14);
lean_ctor_set(x_69, 4, x_14);
x_70 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_70, 0, x_63);
lean_ctor_set(x_70, 1, x_69);
x_71 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_71, 0, x_70);
return x_71;
}
}
else
{
uint8_t x_72; 
lean_dec(x_18);
lean_dec(x_17);
lean_dec(x_15);
lean_dec(x_13);
lean_dec(x_11);
lean_dec(x_10);
lean_dec(x_5);
lean_dec_ref(x_4);
lean_dec_ref(x_3);
lean_dec_ref(x_1);
x_72 = !lean_is_exclusive(x_19);
if (x_72 == 0)
{
return x_19;
}
else
{
lean_object* x_73; lean_object* x_74; 
x_73 = lean_ctor_get(x_19, 0);
lean_inc(x_73);
lean_dec(x_19);
x_74 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_74, 0, x_73);
return x_74;
}
}
}
block_77:
{
uint8_t x_76; 
x_76 = 0;
x_7 = x_76;
goto block_75;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initializeWorker_spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
size_t x_5; size_t x_6; lean_object* x_7; 
x_5 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_6 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_7 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initializeWorker_spec__1(x_1, x_5, x_6, x_4);
lean_dec_ref(x_1);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2(x_1, x_2, x_3);
lean_dec(x_3);
lean_dec(x_2);
lean_dec_ref(x_1);
return x_5;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Server_FileWorker_initializeWorker_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
size_t x_6; size_t x_7; lean_object* x_8; 
x_6 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_7 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_8 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Server_FileWorker_initializeWorker_spec__0(x_1, x_2, x_6, x_7, x_5);
return x_8;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2_spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
size_t x_6; size_t x_7; lean_object* x_8; 
x_6 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_7 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_8 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2_spec__2(x_1, x_6, x_7, x_4);
lean_dec_ref(x_1);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initializeWorker___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_Server_FileWorker_initializeWorker(x_1, x_2, x_3, x_4, x_5);
return x_7;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_sendServerRequest___redArg___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(1u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendServerRequest___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_21; 
x_7 = lean_ctor_get(x_3, 0);
lean_inc_ref(x_7);
x_8 = lean_ctor_get(x_3, 2);
x_9 = lean_st_ref_take(x_8);
x_10 = l_Lean_Server_FileWorker_sendServerRequest___redArg___closed__0;
x_11 = lean_int_add(x_9, x_10);
x_12 = lean_st_ref_set(x_8, x_11);
x_13 = l_Lean_JsonNumber_fromInt(x_9);
x_14 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_14, 0, x_13);
lean_inc_ref(x_14);
x_15 = l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___redArg(x_2, x_3, x_14);
lean_dec_ref(x_3);
x_21 = l_Lean_Json_toStructured_x3f___redArg(x_1, x_5);
if (lean_obj_tag(x_21) == 0)
{
lean_object* x_22; 
lean_dec_ref(x_21);
x_22 = lean_box(0);
x_16 = x_22;
goto block_20;
}
else
{
uint8_t x_23; 
x_23 = !lean_is_exclusive(x_21);
if (x_23 == 0)
{
x_16 = x_21;
goto block_20;
}
else
{
lean_object* x_24; lean_object* x_25; 
x_24 = lean_ctor_get(x_21, 0);
lean_inc(x_24);
lean_dec(x_21);
x_25 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_25, 0, x_24);
x_16 = x_25;
goto block_20;
}
}
block_20:
{
lean_object* x_17; lean_object* x_18; lean_object* x_19; 
x_17 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_17, 0, x_14);
lean_ctor_set(x_17, 1, x_4);
lean_ctor_set(x_17, 2, x_16);
x_18 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_17);
x_19 = l_Std_Channel_Sync_send___redArg(x_7, x_18);
return x_15;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendServerRequest(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
lean_object* x_10; 
x_10 = l_Lean_Server_FileWorker_sendServerRequest___redArg(x_2, x_4, x_6, x_7, x_8);
return x_10;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendServerRequest___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
_start:
{
lean_object* x_10; 
x_10 = l_Lean_Server_FileWorker_sendServerRequest(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
lean_dec(x_5);
return x_10;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendServerRequest___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_Server_FileWorker_sendServerRequest___redArg(x_1, x_2, x_3, x_4, x_5);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__2(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_Json_Structured_fromJson_x3f(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0_spec__0___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; 
x_4 = lean_ctor_get(x_3, 0);
lean_inc(x_4);
x_5 = lean_ctor_get(x_3, 1);
lean_inc(x_5);
x_6 = lean_ctor_get(x_3, 2);
lean_inc(x_6);
x_7 = lean_ctor_get(x_3, 3);
lean_inc(x_7);
x_8 = lean_ctor_get(x_3, 4);
lean_inc(x_8);
if (lean_is_exclusive(x_3)) {
 lean_ctor_release(x_3, 0);
 lean_ctor_release(x_3, 1);
 lean_ctor_release(x_3, 2);
 lean_ctor_release(x_3, 3);
 lean_ctor_release(x_3, 4);
 x_9 = x_3;
} else {
 lean_dec_ref(x_3);
 x_9 = lean_box(0);
}
lean_inc(x_5);
lean_inc(x_1);
x_10 = l_Lean_JsonRpc_instOrdRequestID_ord(x_1, x_5);
switch (x_10) {
case 0:
{
lean_object* x_11; lean_object* x_12; 
lean_dec(x_4);
x_11 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0_spec__0___redArg(x_1, x_2, x_7);
x_12 = lean_unsigned_to_nat(1u);
if (lean_obj_tag(x_8) == 0)
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; 
x_13 = lean_ctor_get(x_8, 0);
x_14 = lean_ctor_get(x_11, 0);
lean_inc(x_14);
x_15 = lean_ctor_get(x_11, 1);
lean_inc(x_15);
x_16 = lean_ctor_get(x_11, 2);
lean_inc(x_16);
x_17 = lean_ctor_get(x_11, 3);
lean_inc(x_17);
x_18 = lean_ctor_get(x_11, 4);
lean_inc(x_18);
x_19 = lean_unsigned_to_nat(3u);
x_20 = lean_nat_mul(x_19, x_13);
x_21 = lean_nat_dec_lt(x_20, x_14);
lean_dec(x_20);
if (x_21 == 0)
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; 
lean_dec(x_18);
lean_dec(x_17);
lean_dec(x_16);
lean_dec(x_15);
x_22 = lean_nat_add(x_12, x_14);
lean_dec(x_14);
x_23 = lean_nat_add(x_22, x_13);
lean_dec(x_22);
if (lean_is_scalar(x_9)) {
 x_24 = lean_alloc_ctor(0, 5, 0);
} else {
 x_24 = x_9;
}
lean_ctor_set(x_24, 0, x_23);
lean_ctor_set(x_24, 1, x_5);
lean_ctor_set(x_24, 2, x_6);
lean_ctor_set(x_24, 3, x_11);
lean_ctor_set(x_24, 4, x_8);
return x_24;
}
else
{
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; 
if (lean_is_exclusive(x_11)) {
 lean_ctor_release(x_11, 0);
 lean_ctor_release(x_11, 1);
 lean_ctor_release(x_11, 2);
 lean_ctor_release(x_11, 3);
 lean_ctor_release(x_11, 4);
 x_25 = x_11;
} else {
 lean_dec_ref(x_11);
 x_25 = lean_box(0);
}
x_26 = lean_ctor_get(x_17, 0);
x_27 = lean_ctor_get(x_18, 0);
x_28 = lean_ctor_get(x_18, 1);
x_29 = lean_ctor_get(x_18, 2);
x_30 = lean_ctor_get(x_18, 3);
x_31 = lean_ctor_get(x_18, 4);
x_32 = lean_unsigned_to_nat(2u);
x_33 = lean_nat_mul(x_32, x_26);
x_34 = lean_nat_dec_lt(x_27, x_33);
lean_dec(x_33);
if (x_34 == 0)
{
lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_45; lean_object* x_46; 
lean_inc(x_31);
lean_inc(x_30);
lean_inc(x_29);
lean_inc(x_28);
if (lean_is_exclusive(x_18)) {
 lean_ctor_release(x_18, 0);
 lean_ctor_release(x_18, 1);
 lean_ctor_release(x_18, 2);
 lean_ctor_release(x_18, 3);
 lean_ctor_release(x_18, 4);
 x_35 = x_18;
} else {
 lean_dec_ref(x_18);
 x_35 = lean_box(0);
}
x_36 = lean_nat_add(x_12, x_14);
lean_dec(x_14);
x_37 = lean_nat_add(x_36, x_13);
lean_dec(x_36);
x_45 = lean_nat_add(x_12, x_26);
if (lean_obj_tag(x_30) == 0)
{
lean_object* x_53; 
x_53 = lean_ctor_get(x_30, 0);
lean_inc(x_53);
x_46 = x_53;
goto block_52;
}
else
{
lean_object* x_54; 
x_54 = lean_unsigned_to_nat(0u);
x_46 = x_54;
goto block_52;
}
block_44:
{
lean_object* x_41; lean_object* x_42; lean_object* x_43; 
x_41 = lean_nat_add(x_39, x_40);
lean_dec(x_40);
lean_dec(x_39);
if (lean_is_scalar(x_35)) {
 x_42 = lean_alloc_ctor(0, 5, 0);
} else {
 x_42 = x_35;
}
lean_ctor_set(x_42, 0, x_41);
lean_ctor_set(x_42, 1, x_5);
lean_ctor_set(x_42, 2, x_6);
lean_ctor_set(x_42, 3, x_31);
lean_ctor_set(x_42, 4, x_8);
if (lean_is_scalar(x_25)) {
 x_43 = lean_alloc_ctor(0, 5, 0);
} else {
 x_43 = x_25;
}
lean_ctor_set(x_43, 0, x_37);
lean_ctor_set(x_43, 1, x_28);
lean_ctor_set(x_43, 2, x_29);
lean_ctor_set(x_43, 3, x_38);
lean_ctor_set(x_43, 4, x_42);
return x_43;
}
block_52:
{
lean_object* x_47; lean_object* x_48; lean_object* x_49; 
x_47 = lean_nat_add(x_45, x_46);
lean_dec(x_46);
lean_dec(x_45);
if (lean_is_scalar(x_9)) {
 x_48 = lean_alloc_ctor(0, 5, 0);
} else {
 x_48 = x_9;
}
lean_ctor_set(x_48, 0, x_47);
lean_ctor_set(x_48, 1, x_15);
lean_ctor_set(x_48, 2, x_16);
lean_ctor_set(x_48, 3, x_17);
lean_ctor_set(x_48, 4, x_30);
x_49 = lean_nat_add(x_12, x_13);
if (lean_obj_tag(x_31) == 0)
{
lean_object* x_50; 
x_50 = lean_ctor_get(x_31, 0);
lean_inc(x_50);
x_38 = x_48;
x_39 = x_49;
x_40 = x_50;
goto block_44;
}
else
{
lean_object* x_51; 
x_51 = lean_unsigned_to_nat(0u);
x_38 = x_48;
x_39 = x_49;
x_40 = x_51;
goto block_44;
}
}
}
else
{
lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; uint8_t x_60; 
lean_dec(x_9);
x_55 = lean_nat_add(x_12, x_14);
lean_dec(x_14);
x_56 = lean_nat_add(x_55, x_13);
lean_dec(x_55);
x_57 = lean_nat_add(x_12, x_13);
x_58 = lean_nat_add(x_57, x_27);
lean_dec(x_57);
lean_inc_ref(x_8);
if (lean_is_scalar(x_25)) {
 x_59 = lean_alloc_ctor(0, 5, 0);
} else {
 x_59 = x_25;
}
lean_ctor_set(x_59, 0, x_58);
lean_ctor_set(x_59, 1, x_5);
lean_ctor_set(x_59, 2, x_6);
lean_ctor_set(x_59, 3, x_18);
lean_ctor_set(x_59, 4, x_8);
x_60 = !lean_is_exclusive(x_8);
if (x_60 == 0)
{
lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; 
x_61 = lean_ctor_get(x_8, 4);
lean_dec(x_61);
x_62 = lean_ctor_get(x_8, 3);
lean_dec(x_62);
x_63 = lean_ctor_get(x_8, 2);
lean_dec(x_63);
x_64 = lean_ctor_get(x_8, 1);
lean_dec(x_64);
x_65 = lean_ctor_get(x_8, 0);
lean_dec(x_65);
lean_ctor_set(x_8, 4, x_59);
lean_ctor_set(x_8, 3, x_17);
lean_ctor_set(x_8, 2, x_16);
lean_ctor_set(x_8, 1, x_15);
lean_ctor_set(x_8, 0, x_56);
return x_8;
}
else
{
lean_object* x_66; 
lean_dec(x_8);
x_66 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_66, 0, x_56);
lean_ctor_set(x_66, 1, x_15);
lean_ctor_set(x_66, 2, x_16);
lean_ctor_set(x_66, 3, x_17);
lean_ctor_set(x_66, 4, x_59);
return x_66;
}
}
}
}
else
{
lean_object* x_67; 
x_67 = lean_ctor_get(x_11, 3);
lean_inc(x_67);
if (lean_obj_tag(x_67) == 0)
{
uint8_t x_68; 
x_68 = !lean_is_exclusive(x_11);
if (x_68 == 0)
{
lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; 
x_69 = lean_ctor_get(x_11, 4);
x_70 = lean_ctor_get(x_11, 1);
x_71 = lean_ctor_get(x_11, 2);
x_72 = lean_ctor_get(x_11, 3);
lean_dec(x_72);
x_73 = lean_ctor_get(x_11, 0);
lean_dec(x_73);
x_74 = lean_unsigned_to_nat(3u);
lean_inc(x_69);
lean_ctor_set(x_11, 3, x_69);
lean_ctor_set(x_11, 2, x_6);
lean_ctor_set(x_11, 1, x_5);
lean_ctor_set(x_11, 0, x_12);
if (lean_is_scalar(x_9)) {
 x_75 = lean_alloc_ctor(0, 5, 0);
} else {
 x_75 = x_9;
}
lean_ctor_set(x_75, 0, x_74);
lean_ctor_set(x_75, 1, x_70);
lean_ctor_set(x_75, 2, x_71);
lean_ctor_set(x_75, 3, x_67);
lean_ctor_set(x_75, 4, x_11);
return x_75;
}
else
{
lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; 
x_76 = lean_ctor_get(x_11, 4);
x_77 = lean_ctor_get(x_11, 1);
x_78 = lean_ctor_get(x_11, 2);
lean_inc(x_76);
lean_inc(x_78);
lean_inc(x_77);
lean_dec(x_11);
x_79 = lean_unsigned_to_nat(3u);
lean_inc(x_76);
x_80 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_80, 0, x_12);
lean_ctor_set(x_80, 1, x_5);
lean_ctor_set(x_80, 2, x_6);
lean_ctor_set(x_80, 3, x_76);
lean_ctor_set(x_80, 4, x_76);
if (lean_is_scalar(x_9)) {
 x_81 = lean_alloc_ctor(0, 5, 0);
} else {
 x_81 = x_9;
}
lean_ctor_set(x_81, 0, x_79);
lean_ctor_set(x_81, 1, x_77);
lean_ctor_set(x_81, 2, x_78);
lean_ctor_set(x_81, 3, x_67);
lean_ctor_set(x_81, 4, x_80);
return x_81;
}
}
else
{
lean_object* x_82; 
x_82 = lean_ctor_get(x_11, 4);
lean_inc(x_82);
if (lean_obj_tag(x_82) == 0)
{
uint8_t x_83; 
x_83 = !lean_is_exclusive(x_11);
if (x_83 == 0)
{
lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; uint8_t x_89; 
x_84 = lean_ctor_get(x_11, 1);
x_85 = lean_ctor_get(x_11, 2);
x_86 = lean_ctor_get(x_11, 4);
lean_dec(x_86);
x_87 = lean_ctor_get(x_11, 3);
lean_dec(x_87);
x_88 = lean_ctor_get(x_11, 0);
lean_dec(x_88);
x_89 = !lean_is_exclusive(x_82);
if (x_89 == 0)
{
lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; 
x_90 = lean_ctor_get(x_82, 1);
x_91 = lean_ctor_get(x_82, 2);
x_92 = lean_ctor_get(x_82, 4);
lean_dec(x_92);
x_93 = lean_ctor_get(x_82, 3);
lean_dec(x_93);
x_94 = lean_ctor_get(x_82, 0);
lean_dec(x_94);
x_95 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_82, 4, x_67);
lean_ctor_set(x_82, 3, x_67);
lean_ctor_set(x_82, 2, x_85);
lean_ctor_set(x_82, 1, x_84);
lean_ctor_set(x_82, 0, x_12);
lean_ctor_set(x_11, 4, x_67);
lean_ctor_set(x_11, 2, x_6);
lean_ctor_set(x_11, 1, x_5);
lean_ctor_set(x_11, 0, x_12);
if (lean_is_scalar(x_9)) {
 x_96 = lean_alloc_ctor(0, 5, 0);
} else {
 x_96 = x_9;
}
lean_ctor_set(x_96, 0, x_95);
lean_ctor_set(x_96, 1, x_90);
lean_ctor_set(x_96, 2, x_91);
lean_ctor_set(x_96, 3, x_82);
lean_ctor_set(x_96, 4, x_11);
return x_96;
}
else
{
lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; 
x_97 = lean_ctor_get(x_82, 1);
x_98 = lean_ctor_get(x_82, 2);
lean_inc(x_98);
lean_inc(x_97);
lean_dec(x_82);
x_99 = lean_unsigned_to_nat(3u);
x_100 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_100, 0, x_12);
lean_ctor_set(x_100, 1, x_84);
lean_ctor_set(x_100, 2, x_85);
lean_ctor_set(x_100, 3, x_67);
lean_ctor_set(x_100, 4, x_67);
lean_ctor_set(x_11, 4, x_67);
lean_ctor_set(x_11, 2, x_6);
lean_ctor_set(x_11, 1, x_5);
lean_ctor_set(x_11, 0, x_12);
if (lean_is_scalar(x_9)) {
 x_101 = lean_alloc_ctor(0, 5, 0);
} else {
 x_101 = x_9;
}
lean_ctor_set(x_101, 0, x_99);
lean_ctor_set(x_101, 1, x_97);
lean_ctor_set(x_101, 2, x_98);
lean_ctor_set(x_101, 3, x_100);
lean_ctor_set(x_101, 4, x_11);
return x_101;
}
}
else
{
lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; 
x_102 = lean_ctor_get(x_11, 1);
x_103 = lean_ctor_get(x_11, 2);
lean_inc(x_103);
lean_inc(x_102);
lean_dec(x_11);
x_104 = lean_ctor_get(x_82, 1);
lean_inc(x_104);
x_105 = lean_ctor_get(x_82, 2);
lean_inc(x_105);
if (lean_is_exclusive(x_82)) {
 lean_ctor_release(x_82, 0);
 lean_ctor_release(x_82, 1);
 lean_ctor_release(x_82, 2);
 lean_ctor_release(x_82, 3);
 lean_ctor_release(x_82, 4);
 x_106 = x_82;
} else {
 lean_dec_ref(x_82);
 x_106 = lean_box(0);
}
x_107 = lean_unsigned_to_nat(3u);
if (lean_is_scalar(x_106)) {
 x_108 = lean_alloc_ctor(0, 5, 0);
} else {
 x_108 = x_106;
}
lean_ctor_set(x_108, 0, x_12);
lean_ctor_set(x_108, 1, x_102);
lean_ctor_set(x_108, 2, x_103);
lean_ctor_set(x_108, 3, x_67);
lean_ctor_set(x_108, 4, x_67);
x_109 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_109, 0, x_12);
lean_ctor_set(x_109, 1, x_5);
lean_ctor_set(x_109, 2, x_6);
lean_ctor_set(x_109, 3, x_67);
lean_ctor_set(x_109, 4, x_67);
if (lean_is_scalar(x_9)) {
 x_110 = lean_alloc_ctor(0, 5, 0);
} else {
 x_110 = x_9;
}
lean_ctor_set(x_110, 0, x_107);
lean_ctor_set(x_110, 1, x_104);
lean_ctor_set(x_110, 2, x_105);
lean_ctor_set(x_110, 3, x_108);
lean_ctor_set(x_110, 4, x_109);
return x_110;
}
}
else
{
lean_object* x_111; lean_object* x_112; 
x_111 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_9)) {
 x_112 = lean_alloc_ctor(0, 5, 0);
} else {
 x_112 = x_9;
}
lean_ctor_set(x_112, 0, x_111);
lean_ctor_set(x_112, 1, x_5);
lean_ctor_set(x_112, 2, x_6);
lean_ctor_set(x_112, 3, x_11);
lean_ctor_set(x_112, 4, x_82);
return x_112;
}
}
}
}
case 1:
{
lean_object* x_113; 
lean_dec(x_6);
lean_dec(x_5);
if (lean_is_scalar(x_9)) {
 x_113 = lean_alloc_ctor(0, 5, 0);
} else {
 x_113 = x_9;
}
lean_ctor_set(x_113, 0, x_4);
lean_ctor_set(x_113, 1, x_1);
lean_ctor_set(x_113, 2, x_2);
lean_ctor_set(x_113, 3, x_7);
lean_ctor_set(x_113, 4, x_8);
return x_113;
}
default: 
{
lean_object* x_114; lean_object* x_115; 
lean_dec(x_4);
x_114 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0_spec__0___redArg(x_1, x_2, x_8);
x_115 = lean_unsigned_to_nat(1u);
if (lean_obj_tag(x_7) == 0)
{
lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; uint8_t x_124; 
x_116 = lean_ctor_get(x_7, 0);
x_117 = lean_ctor_get(x_114, 0);
lean_inc(x_117);
x_118 = lean_ctor_get(x_114, 1);
lean_inc(x_118);
x_119 = lean_ctor_get(x_114, 2);
lean_inc(x_119);
x_120 = lean_ctor_get(x_114, 3);
lean_inc(x_120);
x_121 = lean_ctor_get(x_114, 4);
lean_inc(x_121);
x_122 = lean_unsigned_to_nat(3u);
x_123 = lean_nat_mul(x_122, x_116);
x_124 = lean_nat_dec_lt(x_123, x_117);
lean_dec(x_123);
if (x_124 == 0)
{
lean_object* x_125; lean_object* x_126; lean_object* x_127; 
lean_dec(x_121);
lean_dec(x_120);
lean_dec(x_119);
lean_dec(x_118);
x_125 = lean_nat_add(x_115, x_116);
x_126 = lean_nat_add(x_125, x_117);
lean_dec(x_117);
lean_dec(x_125);
if (lean_is_scalar(x_9)) {
 x_127 = lean_alloc_ctor(0, 5, 0);
} else {
 x_127 = x_9;
}
lean_ctor_set(x_127, 0, x_126);
lean_ctor_set(x_127, 1, x_5);
lean_ctor_set(x_127, 2, x_6);
lean_ctor_set(x_127, 3, x_7);
lean_ctor_set(x_127, 4, x_114);
return x_127;
}
else
{
lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; uint8_t x_137; 
if (lean_is_exclusive(x_114)) {
 lean_ctor_release(x_114, 0);
 lean_ctor_release(x_114, 1);
 lean_ctor_release(x_114, 2);
 lean_ctor_release(x_114, 3);
 lean_ctor_release(x_114, 4);
 x_128 = x_114;
} else {
 lean_dec_ref(x_114);
 x_128 = lean_box(0);
}
x_129 = lean_ctor_get(x_120, 0);
x_130 = lean_ctor_get(x_120, 1);
x_131 = lean_ctor_get(x_120, 2);
x_132 = lean_ctor_get(x_120, 3);
x_133 = lean_ctor_get(x_120, 4);
x_134 = lean_ctor_get(x_121, 0);
x_135 = lean_unsigned_to_nat(2u);
x_136 = lean_nat_mul(x_135, x_134);
x_137 = lean_nat_dec_lt(x_129, x_136);
lean_dec(x_136);
if (x_137 == 0)
{
lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_148; 
lean_inc(x_133);
lean_inc(x_132);
lean_inc(x_131);
lean_inc(x_130);
if (lean_is_exclusive(x_120)) {
 lean_ctor_release(x_120, 0);
 lean_ctor_release(x_120, 1);
 lean_ctor_release(x_120, 2);
 lean_ctor_release(x_120, 3);
 lean_ctor_release(x_120, 4);
 x_138 = x_120;
} else {
 lean_dec_ref(x_120);
 x_138 = lean_box(0);
}
x_139 = lean_nat_add(x_115, x_116);
x_140 = lean_nat_add(x_139, x_117);
lean_dec(x_117);
if (lean_obj_tag(x_132) == 0)
{
lean_object* x_155; 
x_155 = lean_ctor_get(x_132, 0);
lean_inc(x_155);
x_148 = x_155;
goto block_154;
}
else
{
lean_object* x_156; 
x_156 = lean_unsigned_to_nat(0u);
x_148 = x_156;
goto block_154;
}
block_147:
{
lean_object* x_144; lean_object* x_145; lean_object* x_146; 
x_144 = lean_nat_add(x_142, x_143);
lean_dec(x_143);
lean_dec(x_142);
if (lean_is_scalar(x_138)) {
 x_145 = lean_alloc_ctor(0, 5, 0);
} else {
 x_145 = x_138;
}
lean_ctor_set(x_145, 0, x_144);
lean_ctor_set(x_145, 1, x_118);
lean_ctor_set(x_145, 2, x_119);
lean_ctor_set(x_145, 3, x_133);
lean_ctor_set(x_145, 4, x_121);
if (lean_is_scalar(x_128)) {
 x_146 = lean_alloc_ctor(0, 5, 0);
} else {
 x_146 = x_128;
}
lean_ctor_set(x_146, 0, x_140);
lean_ctor_set(x_146, 1, x_130);
lean_ctor_set(x_146, 2, x_131);
lean_ctor_set(x_146, 3, x_141);
lean_ctor_set(x_146, 4, x_145);
return x_146;
}
block_154:
{
lean_object* x_149; lean_object* x_150; lean_object* x_151; 
x_149 = lean_nat_add(x_139, x_148);
lean_dec(x_148);
lean_dec(x_139);
if (lean_is_scalar(x_9)) {
 x_150 = lean_alloc_ctor(0, 5, 0);
} else {
 x_150 = x_9;
}
lean_ctor_set(x_150, 0, x_149);
lean_ctor_set(x_150, 1, x_5);
lean_ctor_set(x_150, 2, x_6);
lean_ctor_set(x_150, 3, x_7);
lean_ctor_set(x_150, 4, x_132);
x_151 = lean_nat_add(x_115, x_134);
if (lean_obj_tag(x_133) == 0)
{
lean_object* x_152; 
x_152 = lean_ctor_get(x_133, 0);
lean_inc(x_152);
x_141 = x_150;
x_142 = x_151;
x_143 = x_152;
goto block_147;
}
else
{
lean_object* x_153; 
x_153 = lean_unsigned_to_nat(0u);
x_141 = x_150;
x_142 = x_151;
x_143 = x_153;
goto block_147;
}
}
}
else
{
lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; uint8_t x_161; 
lean_dec(x_9);
x_157 = lean_nat_add(x_115, x_116);
x_158 = lean_nat_add(x_157, x_117);
lean_dec(x_117);
x_159 = lean_nat_add(x_157, x_129);
lean_dec(x_157);
lean_inc_ref(x_7);
if (lean_is_scalar(x_128)) {
 x_160 = lean_alloc_ctor(0, 5, 0);
} else {
 x_160 = x_128;
}
lean_ctor_set(x_160, 0, x_159);
lean_ctor_set(x_160, 1, x_5);
lean_ctor_set(x_160, 2, x_6);
lean_ctor_set(x_160, 3, x_7);
lean_ctor_set(x_160, 4, x_120);
x_161 = !lean_is_exclusive(x_7);
if (x_161 == 0)
{
lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; 
x_162 = lean_ctor_get(x_7, 4);
lean_dec(x_162);
x_163 = lean_ctor_get(x_7, 3);
lean_dec(x_163);
x_164 = lean_ctor_get(x_7, 2);
lean_dec(x_164);
x_165 = lean_ctor_get(x_7, 1);
lean_dec(x_165);
x_166 = lean_ctor_get(x_7, 0);
lean_dec(x_166);
lean_ctor_set(x_7, 4, x_121);
lean_ctor_set(x_7, 3, x_160);
lean_ctor_set(x_7, 2, x_119);
lean_ctor_set(x_7, 1, x_118);
lean_ctor_set(x_7, 0, x_158);
return x_7;
}
else
{
lean_object* x_167; 
lean_dec(x_7);
x_167 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_167, 0, x_158);
lean_ctor_set(x_167, 1, x_118);
lean_ctor_set(x_167, 2, x_119);
lean_ctor_set(x_167, 3, x_160);
lean_ctor_set(x_167, 4, x_121);
return x_167;
}
}
}
}
else
{
lean_object* x_168; 
x_168 = lean_ctor_get(x_114, 3);
lean_inc(x_168);
if (lean_obj_tag(x_168) == 0)
{
uint8_t x_169; 
x_169 = !lean_is_exclusive(x_114);
if (x_169 == 0)
{
lean_object* x_170; lean_object* x_171; lean_object* x_172; uint8_t x_173; 
x_170 = lean_ctor_get(x_114, 4);
x_171 = lean_ctor_get(x_114, 3);
lean_dec(x_171);
x_172 = lean_ctor_get(x_114, 0);
lean_dec(x_172);
x_173 = !lean_is_exclusive(x_168);
if (x_173 == 0)
{
lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; 
x_174 = lean_ctor_get(x_168, 1);
x_175 = lean_ctor_get(x_168, 2);
x_176 = lean_ctor_get(x_168, 4);
lean_dec(x_176);
x_177 = lean_ctor_get(x_168, 3);
lean_dec(x_177);
x_178 = lean_ctor_get(x_168, 0);
lean_dec(x_178);
x_179 = lean_unsigned_to_nat(3u);
lean_inc_n(x_170, 2);
lean_ctor_set(x_168, 4, x_170);
lean_ctor_set(x_168, 3, x_170);
lean_ctor_set(x_168, 2, x_6);
lean_ctor_set(x_168, 1, x_5);
lean_ctor_set(x_168, 0, x_115);
lean_inc(x_170);
lean_ctor_set(x_114, 3, x_170);
lean_ctor_set(x_114, 0, x_115);
if (lean_is_scalar(x_9)) {
 x_180 = lean_alloc_ctor(0, 5, 0);
} else {
 x_180 = x_9;
}
lean_ctor_set(x_180, 0, x_179);
lean_ctor_set(x_180, 1, x_174);
lean_ctor_set(x_180, 2, x_175);
lean_ctor_set(x_180, 3, x_168);
lean_ctor_set(x_180, 4, x_114);
return x_180;
}
else
{
lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; 
x_181 = lean_ctor_get(x_168, 1);
x_182 = lean_ctor_get(x_168, 2);
lean_inc(x_182);
lean_inc(x_181);
lean_dec(x_168);
x_183 = lean_unsigned_to_nat(3u);
lean_inc_n(x_170, 2);
x_184 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_184, 0, x_115);
lean_ctor_set(x_184, 1, x_5);
lean_ctor_set(x_184, 2, x_6);
lean_ctor_set(x_184, 3, x_170);
lean_ctor_set(x_184, 4, x_170);
lean_inc(x_170);
lean_ctor_set(x_114, 3, x_170);
lean_ctor_set(x_114, 0, x_115);
if (lean_is_scalar(x_9)) {
 x_185 = lean_alloc_ctor(0, 5, 0);
} else {
 x_185 = x_9;
}
lean_ctor_set(x_185, 0, x_183);
lean_ctor_set(x_185, 1, x_181);
lean_ctor_set(x_185, 2, x_182);
lean_ctor_set(x_185, 3, x_184);
lean_ctor_set(x_185, 4, x_114);
return x_185;
}
}
else
{
lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; 
x_186 = lean_ctor_get(x_114, 4);
x_187 = lean_ctor_get(x_114, 1);
x_188 = lean_ctor_get(x_114, 2);
lean_inc(x_186);
lean_inc(x_188);
lean_inc(x_187);
lean_dec(x_114);
x_189 = lean_ctor_get(x_168, 1);
lean_inc(x_189);
x_190 = lean_ctor_get(x_168, 2);
lean_inc(x_190);
if (lean_is_exclusive(x_168)) {
 lean_ctor_release(x_168, 0);
 lean_ctor_release(x_168, 1);
 lean_ctor_release(x_168, 2);
 lean_ctor_release(x_168, 3);
 lean_ctor_release(x_168, 4);
 x_191 = x_168;
} else {
 lean_dec_ref(x_168);
 x_191 = lean_box(0);
}
x_192 = lean_unsigned_to_nat(3u);
lean_inc_n(x_186, 2);
if (lean_is_scalar(x_191)) {
 x_193 = lean_alloc_ctor(0, 5, 0);
} else {
 x_193 = x_191;
}
lean_ctor_set(x_193, 0, x_115);
lean_ctor_set(x_193, 1, x_5);
lean_ctor_set(x_193, 2, x_6);
lean_ctor_set(x_193, 3, x_186);
lean_ctor_set(x_193, 4, x_186);
lean_inc(x_186);
x_194 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_194, 0, x_115);
lean_ctor_set(x_194, 1, x_187);
lean_ctor_set(x_194, 2, x_188);
lean_ctor_set(x_194, 3, x_186);
lean_ctor_set(x_194, 4, x_186);
if (lean_is_scalar(x_9)) {
 x_195 = lean_alloc_ctor(0, 5, 0);
} else {
 x_195 = x_9;
}
lean_ctor_set(x_195, 0, x_192);
lean_ctor_set(x_195, 1, x_189);
lean_ctor_set(x_195, 2, x_190);
lean_ctor_set(x_195, 3, x_193);
lean_ctor_set(x_195, 4, x_194);
return x_195;
}
}
else
{
lean_object* x_196; 
x_196 = lean_ctor_get(x_114, 4);
lean_inc(x_196);
if (lean_obj_tag(x_196) == 0)
{
uint8_t x_197; 
x_197 = !lean_is_exclusive(x_114);
if (x_197 == 0)
{
lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; 
x_198 = lean_ctor_get(x_114, 1);
x_199 = lean_ctor_get(x_114, 2);
x_200 = lean_ctor_get(x_114, 4);
lean_dec(x_200);
x_201 = lean_ctor_get(x_114, 3);
lean_dec(x_201);
x_202 = lean_ctor_get(x_114, 0);
lean_dec(x_202);
x_203 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_114, 4, x_168);
lean_ctor_set(x_114, 2, x_6);
lean_ctor_set(x_114, 1, x_5);
lean_ctor_set(x_114, 0, x_115);
if (lean_is_scalar(x_9)) {
 x_204 = lean_alloc_ctor(0, 5, 0);
} else {
 x_204 = x_9;
}
lean_ctor_set(x_204, 0, x_203);
lean_ctor_set(x_204, 1, x_198);
lean_ctor_set(x_204, 2, x_199);
lean_ctor_set(x_204, 3, x_114);
lean_ctor_set(x_204, 4, x_196);
return x_204;
}
else
{
lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; 
x_205 = lean_ctor_get(x_114, 1);
x_206 = lean_ctor_get(x_114, 2);
lean_inc(x_206);
lean_inc(x_205);
lean_dec(x_114);
x_207 = lean_unsigned_to_nat(3u);
x_208 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_208, 0, x_115);
lean_ctor_set(x_208, 1, x_5);
lean_ctor_set(x_208, 2, x_6);
lean_ctor_set(x_208, 3, x_168);
lean_ctor_set(x_208, 4, x_168);
if (lean_is_scalar(x_9)) {
 x_209 = lean_alloc_ctor(0, 5, 0);
} else {
 x_209 = x_9;
}
lean_ctor_set(x_209, 0, x_207);
lean_ctor_set(x_209, 1, x_205);
lean_ctor_set(x_209, 2, x_206);
lean_ctor_set(x_209, 3, x_208);
lean_ctor_set(x_209, 4, x_196);
return x_209;
}
}
else
{
lean_object* x_210; lean_object* x_211; 
x_210 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_9)) {
 x_211 = lean_alloc_ctor(0, 5, 0);
} else {
 x_211 = x_9;
}
lean_ctor_set(x_211, 0, x_210);
lean_ctor_set(x_211, 1, x_5);
lean_ctor_set(x_211, 2, x_6);
lean_ctor_set(x_211, 3, x_196);
lean_ctor_set(x_211, 4, x_114);
return x_211;
}
}
}
}
}
}
else
{
lean_object* x_212; lean_object* x_213; 
x_212 = lean_unsigned_to_nat(1u);
x_213 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_213, 0, x_212);
lean_ctor_set(x_213, 1, x_1);
lean_ctor_set(x_213, 2, x_2);
lean_ctor_set(x_213, 3, x_3);
lean_ctor_set(x_213, 4, x_3);
return x_213;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0___redArg___lam__0(lean_object* x_1) {
_start:
{
lean_inc_ref(x_1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0___redArg___lam__0___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0___redArg___lam__0(x_1);
lean_dec_ref(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; 
x_4 = lean_io_promise_new();
x_5 = lean_ctor_get(x_1, 5);
x_6 = lean_st_ref_take(x_5);
lean_inc(x_4);
x_7 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0_spec__0___redArg(x_2, x_4, x_6);
x_8 = lean_st_ref_set(x_5, x_7);
x_9 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0___redArg___lam__0___boxed), 1, 0);
x_10 = l_IO_Promise_result_x21___redArg(x_4);
lean_dec(x_4);
x_11 = l_Lean_Server_ServerTask_mapCheap___redArg(x_9, x_10);
return x_11;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0___redArg(x_2, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0_spec__0___redArg(x_2, x_3, x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_20; 
x_6 = lean_ctor_get(x_2, 0);
lean_inc_ref(x_6);
x_7 = lean_ctor_get(x_2, 2);
x_8 = lean_st_ref_take(x_7);
x_9 = l_Lean_Server_FileWorker_sendServerRequest___redArg___closed__0;
x_10 = lean_int_add(x_8, x_9);
x_11 = lean_st_ref_set(x_7, x_10);
x_12 = l_Lean_JsonNumber_fromInt(x_8);
x_13 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_13, 0, x_12);
lean_inc_ref(x_13);
x_14 = l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0___redArg(x_2, x_13);
lean_dec_ref(x_2);
x_20 = l_Lean_Json_Structured_fromJson_x3f(x_4);
if (lean_obj_tag(x_20) == 0)
{
lean_object* x_21; 
lean_dec_ref(x_20);
x_21 = lean_box(0);
x_15 = x_21;
goto block_19;
}
else
{
uint8_t x_22; 
x_22 = !lean_is_exclusive(x_20);
if (x_22 == 0)
{
x_15 = x_20;
goto block_19;
}
else
{
lean_object* x_23; lean_object* x_24; 
x_23 = lean_ctor_get(x_20, 0);
lean_inc(x_23);
lean_dec(x_20);
x_24 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_24, 0, x_23);
x_15 = x_24;
goto block_19;
}
}
block_19:
{
lean_object* x_16; lean_object* x_17; lean_object* x_18; 
x_16 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_16, 0, x_13);
lean_ctor_set(x_16, 1, x_3);
lean_ctor_set(x_16, 2, x_15);
x_17 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_16);
x_18 = l_Std_Channel_Sync_send___redArg(x_6, x_17);
return x_14;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendUntypedServerRequest(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; lean_object* x_6; 
x_5 = lean_box(0);
x_6 = l_Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0(x_5, x_1, x_2, x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0(x_1, x_2, x_3);
lean_dec_ref(x_2);
lean_dec(x_1);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendUntypedServerRequest___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_sendUntypedServerRequest(x_1, x_2, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0___redArg(x_1, x_2);
lean_dec_ref(x_1);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0(x_1, x_2, x_3, x_4);
lean_dec(x_1);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_updatePendingRequests___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; uint8_t x_5; 
x_4 = lean_st_ref_take(x_2);
x_5 = !lean_is_exclusive(x_4);
if (x_5 == 0)
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
x_6 = lean_ctor_get(x_4, 3);
x_7 = lean_apply_1(x_1, x_6);
lean_ctor_set(x_4, 3, x_7);
x_8 = lean_st_ref_set(x_2, x_4);
x_9 = lean_box(0);
x_10 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_10, 0, x_9);
return x_10;
}
else
{
lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; 
x_11 = lean_ctor_get(x_4, 0);
x_12 = lean_ctor_get(x_4, 1);
x_13 = lean_ctor_get(x_4, 2);
x_14 = lean_ctor_get(x_4, 3);
x_15 = lean_ctor_get(x_4, 4);
lean_inc(x_15);
lean_inc(x_14);
lean_inc(x_13);
lean_inc(x_12);
lean_inc(x_11);
lean_dec(x_4);
x_16 = lean_apply_1(x_1, x_14);
x_17 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_17, 0, x_11);
lean_ctor_set(x_17, 1, x_12);
lean_ctor_set(x_17, 2, x_13);
lean_ctor_set(x_17, 3, x_16);
lean_ctor_set(x_17, 4, x_15);
x_18 = lean_st_ref_set(x_2, x_17);
x_19 = lean_box(0);
x_20 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_20, 0, x_19);
return x_20;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_updatePendingRequests(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_updatePendingRequests___redArg(x_1, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_updatePendingRequests___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_updatePendingRequests(x_1, x_2, x_3);
lean_dec(x_3);
lean_dec_ref(x_2);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_updatePendingRequests___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_FileWorker_updatePendingRequests___redArg(x_1, x_2);
lean_dec(x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_updateDocument(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; 
x_5 = lean_st_ref_get(x_3);
x_6 = lean_ctor_get(x_5, 1);
lean_inc(x_6);
lean_dec(x_5);
x_7 = l_IO_CancelToken_set(x_6);
lean_dec(x_6);
x_8 = lean_ctor_get(x_2, 1);
lean_inc(x_8);
x_9 = lean_ctor_get(x_2, 8);
lean_inc_ref(x_1);
x_10 = l_Lean_Server_DocumentMeta_mkInputContext(x_1);
lean_inc_ref(x_9);
x_11 = lean_apply_2(x_9, x_10, lean_box(0));
x_12 = l_Lean_Server_FileWorker_initializeWorker___closed__1;
x_13 = lean_st_mk_ref(x_12);
x_14 = l_IO_CancelToken_new();
lean_inc_ref(x_11);
x_15 = l_Lean_Server_FileWorker_EditableDocumentCore___private__1(x_11);
lean_inc_ref(x_1);
x_16 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_16, 0, x_1);
lean_ctor_set(x_16, 1, x_11);
lean_ctor_set(x_16, 2, x_15);
lean_ctor_set(x_16, 3, x_13);
lean_inc(x_14);
lean_inc_ref(x_16);
x_17 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots(x_2, x_16, x_14);
x_18 = lean_st_ref_take(x_3);
x_19 = !lean_is_exclusive(x_18);
if (x_19 == 0)
{
lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; 
x_20 = lean_ctor_get(x_18, 1);
lean_dec(x_20);
x_21 = lean_ctor_get(x_18, 0);
lean_dec(x_21);
x_22 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_22, 0, x_16);
lean_ctor_set(x_22, 1, x_17);
lean_ctor_set(x_18, 1, x_14);
lean_ctor_set(x_18, 0, x_22);
x_23 = lean_st_ref_set(x_3, x_18);
x_24 = lean_ctor_get(x_1, 2);
lean_inc(x_24);
lean_dec_ref(x_1);
x_25 = lean_nat_to_int(x_24);
x_26 = lean_st_ref_set(x_8, x_25);
lean_dec(x_8);
x_27 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_27, 0, x_26);
return x_27;
}
else
{
lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; 
x_28 = lean_ctor_get(x_18, 2);
x_29 = lean_ctor_get(x_18, 3);
x_30 = lean_ctor_get(x_18, 4);
lean_inc(x_30);
lean_inc(x_29);
lean_inc(x_28);
lean_dec(x_18);
x_31 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_31, 0, x_16);
lean_ctor_set(x_31, 1, x_17);
x_32 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_32, 0, x_31);
lean_ctor_set(x_32, 1, x_14);
lean_ctor_set(x_32, 2, x_28);
lean_ctor_set(x_32, 3, x_29);
lean_ctor_set(x_32, 4, x_30);
x_33 = lean_st_ref_set(x_3, x_32);
x_34 = lean_ctor_get(x_1, 2);
lean_inc(x_34);
lean_dec_ref(x_1);
x_35 = lean_nat_to_int(x_34);
x_36 = lean_st_ref_set(x_8, x_35);
lean_dec(x_8);
x_37 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_37, 0, x_36);
return x_37;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_updateDocument___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_updateDocument(x_1, x_2, x_3);
lean_dec(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_handleDidChange_spec__0___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
x_5 = lean_ctor_get(x_3, 2);
x_6 = lean_ctor_get(x_3, 3);
x_7 = lean_ctor_get(x_3, 4);
x_8 = l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_handleDidChange_spec__0___redArg(x_1, x_2, x_6);
lean_dec_ref(x_8);
x_9 = lean_ctor_get(x_5, 1);
x_10 = l_Lean_Server_RequestCancellationToken_cancelByEdit(x_9);
{
lean_object* _tmp_1 = x_1;
lean_object* _tmp_2 = x_7;
x_2 = _tmp_1;
x_3 = _tmp_2;
}
goto _start;
}
else
{
lean_object* x_12; lean_object* x_13; 
x_12 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_12, 0, x_2);
x_13 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_13, 0, x_12);
return x_13;
}
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_handleDidChange_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_7; 
x_7 = l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_handleDidChange_spec__0___redArg(x_1, x_2, x_3);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleDidChange(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_65; 
x_5 = lean_st_ref_get(x_3);
x_6 = lean_st_ref_get(x_3);
x_7 = l_Lean_Server_RequestCancellationToken_new();
x_8 = lean_ctor_get(x_1, 0);
x_9 = lean_ctor_get(x_1, 1);
lean_inc_ref(x_9);
x_10 = lean_ctor_get(x_6, 0);
lean_inc_ref(x_10);
lean_dec(x_6);
x_65 = lean_ctor_get(x_8, 1);
if (lean_obj_tag(x_65) == 0)
{
lean_object* x_66; 
x_66 = lean_unsigned_to_nat(0u);
x_11 = x_66;
goto block_64;
}
else
{
lean_object* x_67; 
x_67 = lean_ctor_get(x_65, 0);
lean_inc(x_67);
x_11 = x_67;
goto block_64;
}
block_64:
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; 
x_12 = lean_ctor_get(x_5, 3);
lean_inc(x_12);
x_13 = lean_ctor_get(x_5, 4);
lean_inc(x_13);
lean_dec(x_5);
x_14 = lean_ctor_get(x_2, 6);
x_15 = lean_ctor_get(x_2, 7);
lean_inc_ref(x_2);
x_16 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_sendUntypedServerRequest___boxed), 4, 1);
lean_closure_set(x_16, 0, x_2);
lean_inc_ref(x_15);
lean_inc_ref(x_14);
lean_inc_ref(x_10);
x_17 = lean_alloc_ctor(0, 6, 0);
lean_ctor_set(x_17, 0, x_13);
lean_ctor_set(x_17, 1, x_10);
lean_ctor_set(x_17, 2, x_14);
lean_ctor_set(x_17, 3, x_15);
lean_ctor_set(x_17, 4, x_7);
lean_ctor_set(x_17, 5, x_16);
x_18 = lean_alloc_closure((void*)(l_Lean_Server_handleOnDidChange___boxed), 3, 1);
lean_closure_set(x_18, 0, x_1);
x_19 = l_Lean_Server_RequestM_runInIO___redArg(x_18, x_17);
if (lean_obj_tag(x_19) == 0)
{
uint8_t x_20; 
x_20 = !lean_is_exclusive(x_19);
if (x_20 == 0)
{
lean_object* x_21; uint8_t x_22; 
x_21 = lean_ctor_get(x_19, 0);
lean_dec(x_21);
x_22 = l_Array_isEmpty___redArg(x_9);
if (x_22 == 0)
{
lean_object* x_23; lean_object* x_24; uint8_t x_25; 
lean_free_object(x_19);
x_23 = lean_ctor_get(x_10, 0);
lean_inc_ref(x_23);
lean_dec_ref(x_10);
x_24 = lean_ctor_get(x_23, 0);
lean_inc_ref(x_24);
lean_dec_ref(x_23);
x_25 = !lean_is_exclusive(x_24);
if (x_25 == 0)
{
lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; 
x_26 = lean_ctor_get(x_24, 3);
x_27 = lean_ctor_get(x_24, 2);
lean_dec(x_27);
x_28 = l_Lean_Server_foldDocumentChanges(x_9, x_26);
lean_dec_ref(x_9);
lean_ctor_set(x_24, 3, x_28);
lean_ctor_set(x_24, 2, x_11);
x_29 = l_Lean_Server_FileWorker_updateDocument(x_24, x_2, x_3);
lean_dec_ref(x_29);
x_30 = lean_box(0);
x_31 = l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_handleDidChange_spec__0___redArg(x_30, x_30, x_12);
lean_dec(x_12);
x_32 = !lean_is_exclusive(x_31);
if (x_32 == 0)
{
lean_object* x_33; 
x_33 = lean_ctor_get(x_31, 0);
lean_dec(x_33);
lean_ctor_set(x_31, 0, x_30);
return x_31;
}
else
{
lean_object* x_34; 
lean_dec(x_31);
x_34 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_34, 0, x_30);
return x_34;
}
}
else
{
lean_object* x_35; lean_object* x_36; lean_object* x_37; uint8_t x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; 
x_35 = lean_ctor_get(x_24, 0);
x_36 = lean_ctor_get(x_24, 1);
x_37 = lean_ctor_get(x_24, 3);
x_38 = lean_ctor_get_uint8(x_24, sizeof(void*)*4);
lean_inc(x_37);
lean_inc(x_36);
lean_inc(x_35);
lean_dec(x_24);
x_39 = l_Lean_Server_foldDocumentChanges(x_9, x_37);
lean_dec_ref(x_9);
x_40 = lean_alloc_ctor(0, 4, 1);
lean_ctor_set(x_40, 0, x_35);
lean_ctor_set(x_40, 1, x_36);
lean_ctor_set(x_40, 2, x_11);
lean_ctor_set(x_40, 3, x_39);
lean_ctor_set_uint8(x_40, sizeof(void*)*4, x_38);
x_41 = l_Lean_Server_FileWorker_updateDocument(x_40, x_2, x_3);
lean_dec_ref(x_41);
x_42 = lean_box(0);
x_43 = l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_handleDidChange_spec__0___redArg(x_42, x_42, x_12);
lean_dec(x_12);
if (lean_is_exclusive(x_43)) {
 lean_ctor_release(x_43, 0);
 x_44 = x_43;
} else {
 lean_dec_ref(x_43);
 x_44 = lean_box(0);
}
if (lean_is_scalar(x_44)) {
 x_45 = lean_alloc_ctor(0, 1, 0);
} else {
 x_45 = x_44;
}
lean_ctor_set(x_45, 0, x_42);
return x_45;
}
}
else
{
lean_object* x_46; 
lean_dec(x_12);
lean_dec(x_11);
lean_dec_ref(x_10);
lean_dec_ref(x_9);
lean_dec_ref(x_2);
x_46 = lean_box(0);
lean_ctor_set(x_19, 0, x_46);
return x_19;
}
}
else
{
uint8_t x_47; 
lean_dec(x_19);
x_47 = l_Array_isEmpty___redArg(x_9);
if (x_47 == 0)
{
lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; uint8_t x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; 
x_48 = lean_ctor_get(x_10, 0);
lean_inc_ref(x_48);
lean_dec_ref(x_10);
x_49 = lean_ctor_get(x_48, 0);
lean_inc_ref(x_49);
lean_dec_ref(x_48);
x_50 = lean_ctor_get(x_49, 0);
lean_inc_ref(x_50);
x_51 = lean_ctor_get(x_49, 1);
lean_inc(x_51);
x_52 = lean_ctor_get(x_49, 3);
lean_inc_ref(x_52);
x_53 = lean_ctor_get_uint8(x_49, sizeof(void*)*4);
if (lean_is_exclusive(x_49)) {
 lean_ctor_release(x_49, 0);
 lean_ctor_release(x_49, 1);
 lean_ctor_release(x_49, 2);
 lean_ctor_release(x_49, 3);
 x_54 = x_49;
} else {
 lean_dec_ref(x_49);
 x_54 = lean_box(0);
}
x_55 = l_Lean_Server_foldDocumentChanges(x_9, x_52);
lean_dec_ref(x_9);
if (lean_is_scalar(x_54)) {
 x_56 = lean_alloc_ctor(0, 4, 1);
} else {
 x_56 = x_54;
}
lean_ctor_set(x_56, 0, x_50);
lean_ctor_set(x_56, 1, x_51);
lean_ctor_set(x_56, 2, x_11);
lean_ctor_set(x_56, 3, x_55);
lean_ctor_set_uint8(x_56, sizeof(void*)*4, x_53);
x_57 = l_Lean_Server_FileWorker_updateDocument(x_56, x_2, x_3);
lean_dec_ref(x_57);
x_58 = lean_box(0);
x_59 = l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_handleDidChange_spec__0___redArg(x_58, x_58, x_12);
lean_dec(x_12);
if (lean_is_exclusive(x_59)) {
 lean_ctor_release(x_59, 0);
 x_60 = x_59;
} else {
 lean_dec_ref(x_59);
 x_60 = lean_box(0);
}
if (lean_is_scalar(x_60)) {
 x_61 = lean_alloc_ctor(0, 1, 0);
} else {
 x_61 = x_60;
}
lean_ctor_set(x_61, 0, x_58);
return x_61;
}
else
{
lean_object* x_62; lean_object* x_63; 
lean_dec(x_12);
lean_dec(x_11);
lean_dec_ref(x_10);
lean_dec_ref(x_9);
lean_dec_ref(x_2);
x_62 = lean_box(0);
x_63 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_63, 0, x_62);
return x_63;
}
}
}
else
{
lean_dec(x_12);
lean_dec(x_11);
lean_dec_ref(x_10);
lean_dec_ref(x_9);
lean_dec_ref(x_2);
return x_19;
}
}
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_handleDidChange_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_handleDidChange_spec__0(x_1, x_2, x_3, x_4, x_5);
lean_dec(x_5);
lean_dec_ref(x_4);
lean_dec(x_3);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_handleDidChange_spec__0___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_handleDidChange_spec__0___redArg(x_1, x_2, x_3);
lean_dec(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleDidChange___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_handleDidChange(x_1, x_2, x_3);
lean_dec(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleCancelRequest___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; uint8_t x_5; 
x_4 = lean_st_ref_get(x_2);
x_5 = !lean_is_exclusive(x_4);
if (x_5 == 0)
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; 
x_6 = lean_ctor_get(x_4, 0);
x_7 = lean_ctor_get(x_4, 1);
x_8 = lean_ctor_get(x_4, 2);
x_9 = lean_ctor_get(x_4, 3);
x_10 = lean_ctor_get(x_4, 4);
lean_inc(x_1);
lean_inc(x_9);
x_11 = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__1___redArg(x_9, x_1);
if (lean_obj_tag(x_11) == 1)
{
uint8_t x_12; 
x_12 = !lean_is_exclusive(x_11);
if (x_12 == 0)
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; 
x_13 = lean_ctor_get(x_11, 0);
x_14 = lean_ctor_get(x_13, 1);
lean_inc_ref(x_14);
lean_dec(x_13);
x_15 = l_Lean_Server_RequestCancellationToken_cancelByCancelRequest(x_14);
lean_dec_ref(x_14);
x_16 = l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__0___redArg(x_1, x_9);
lean_ctor_set(x_4, 3, x_16);
x_17 = lean_st_ref_set(x_2, x_4);
lean_ctor_set_tag(x_11, 0);
lean_ctor_set(x_11, 0, x_17);
return x_11;
}
else
{
lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; 
x_18 = lean_ctor_get(x_11, 0);
lean_inc(x_18);
lean_dec(x_11);
x_19 = lean_ctor_get(x_18, 1);
lean_inc_ref(x_19);
lean_dec(x_18);
x_20 = l_Lean_Server_RequestCancellationToken_cancelByCancelRequest(x_19);
lean_dec_ref(x_19);
x_21 = l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__0___redArg(x_1, x_9);
lean_ctor_set(x_4, 3, x_21);
x_22 = lean_st_ref_set(x_2, x_4);
x_23 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_23, 0, x_22);
return x_23;
}
}
else
{
lean_object* x_24; lean_object* x_25; 
lean_dec(x_11);
lean_free_object(x_4);
lean_dec(x_10);
lean_dec(x_9);
lean_dec(x_8);
lean_dec(x_7);
lean_dec_ref(x_6);
lean_dec(x_1);
x_24 = lean_box(0);
x_25 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_25, 0, x_24);
return x_25;
}
}
else
{
lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; 
x_26 = lean_ctor_get(x_4, 0);
x_27 = lean_ctor_get(x_4, 1);
x_28 = lean_ctor_get(x_4, 2);
x_29 = lean_ctor_get(x_4, 3);
x_30 = lean_ctor_get(x_4, 4);
lean_inc(x_30);
lean_inc(x_29);
lean_inc(x_28);
lean_inc(x_27);
lean_inc(x_26);
lean_dec(x_4);
lean_inc(x_1);
lean_inc(x_29);
x_31 = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__1___redArg(x_29, x_1);
if (lean_obj_tag(x_31) == 1)
{
lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; 
x_32 = lean_ctor_get(x_31, 0);
lean_inc(x_32);
if (lean_is_exclusive(x_31)) {
 lean_ctor_release(x_31, 0);
 x_33 = x_31;
} else {
 lean_dec_ref(x_31);
 x_33 = lean_box(0);
}
x_34 = lean_ctor_get(x_32, 1);
lean_inc_ref(x_34);
lean_dec(x_32);
x_35 = l_Lean_Server_RequestCancellationToken_cancelByCancelRequest(x_34);
lean_dec_ref(x_34);
x_36 = l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__0___redArg(x_1, x_29);
x_37 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_37, 0, x_26);
lean_ctor_set(x_37, 1, x_27);
lean_ctor_set(x_37, 2, x_28);
lean_ctor_set(x_37, 3, x_36);
lean_ctor_set(x_37, 4, x_30);
x_38 = lean_st_ref_set(x_2, x_37);
if (lean_is_scalar(x_33)) {
 x_39 = lean_alloc_ctor(0, 1, 0);
} else {
 x_39 = x_33;
 lean_ctor_set_tag(x_39, 0);
}
lean_ctor_set(x_39, 0, x_38);
return x_39;
}
else
{
lean_object* x_40; lean_object* x_41; 
lean_dec(x_31);
lean_dec(x_30);
lean_dec(x_29);
lean_dec(x_28);
lean_dec(x_27);
lean_dec_ref(x_26);
lean_dec(x_1);
x_40 = lean_box(0);
x_41 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_41, 0, x_40);
return x_41;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleCancelRequest(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_handleCancelRequest___redArg(x_1, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleCancelRequest___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_handleCancelRequest(x_1, x_2, x_3);
lean_dec(x_3);
lean_dec_ref(x_2);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleCancelRequest___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_FileWorker_handleCancelRequest___redArg(x_1, x_2);
lean_dec(x_2);
return x_4;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Imports are out of date and should be rebuilt; use the \"Restart File\" command in your editor.", 93, 93);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__0;
x_2 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Server_FileWorker_handleStaleDependency_spec__0(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; uint8_t x_11; 
x_11 = lean_usize_dec_eq(x_3, x_4);
if (x_11 == 0)
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; 
x_12 = lean_array_uget(x_2, x_3);
x_13 = lean_ctor_get(x_12, 6);
lean_inc(x_13);
x_14 = l_Lean_Widget_TaggedText_stripTags___redArg(x_13);
lean_inc_ref(x_1);
x_15 = l_Lean_Widget_TaggedText_stripTags___redArg(x_1);
x_16 = lean_string_dec_eq(x_14, x_15);
lean_dec_ref(x_15);
lean_dec_ref(x_14);
if (x_16 == 0)
{
lean_object* x_17; 
x_17 = lean_array_push(x_5, x_12);
x_6 = x_17;
goto block_10;
}
else
{
lean_dec(x_12);
x_6 = x_5;
goto block_10;
}
}
else
{
lean_dec_ref(x_1);
return x_5;
}
block_10:
{
size_t x_7; size_t x_8; 
x_7 = 1;
x_8 = lean_usize_add(x_3, x_7);
x_3 = x_8;
x_5 = x_6;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleStaleDependency___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; 
x_4 = lean_st_ref_get(x_2);
x_5 = lean_ctor_get(x_1, 3);
x_6 = lean_st_ref_take(x_5);
x_7 = lean_ctor_get(x_4, 0);
lean_inc_ref(x_7);
lean_dec(x_4);
x_8 = !lean_is_exclusive(x_7);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; 
x_9 = lean_ctor_get(x_7, 0);
x_10 = lean_ctor_get(x_7, 1);
lean_dec(x_10);
x_16 = lean_ctor_get(x_9, 0);
x_17 = lean_ctor_get(x_16, 3);
x_18 = lean_ctor_get(x_17, 0);
x_19 = l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__1;
x_20 = lean_unsigned_to_nat(0u);
x_21 = l_Lean_Server_FileWorker_setupImports___lam__0___closed__0;
x_22 = l_Lean_Server_FileWorker_setupImports___lam__0___closed__2;
x_23 = lean_string_utf8_byte_size(x_18);
lean_inc_ref(x_17);
x_24 = l_Lean_FileMap_utf8PosToLspPos(x_17, x_23);
lean_dec(x_23);
lean_ctor_set(x_7, 1, x_24);
lean_ctor_set(x_7, 0, x_21);
x_25 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_25, 0, x_7);
x_26 = l_Lean_Server_FileWorker_setupImports___lam__0___closed__3;
x_27 = lean_box(0);
x_28 = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(x_28, 0, x_22);
lean_ctor_set(x_28, 1, x_25);
lean_ctor_set(x_28, 2, x_26);
lean_ctor_set(x_28, 3, x_27);
lean_ctor_set(x_28, 4, x_27);
lean_ctor_set(x_28, 5, x_27);
lean_ctor_set(x_28, 6, x_19);
lean_ctor_set(x_28, 7, x_27);
lean_ctor_set(x_28, 8, x_27);
lean_ctor_set(x_28, 9, x_27);
lean_ctor_set(x_28, 10, x_27);
x_29 = lean_array_get_size(x_6);
x_30 = l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__2;
x_31 = lean_nat_dec_lt(x_20, x_29);
if (x_31 == 0)
{
lean_object* x_32; 
lean_dec(x_29);
lean_dec(x_6);
x_32 = lean_array_push(x_30, x_28);
x_11 = x_32;
goto block_15;
}
else
{
uint8_t x_33; 
x_33 = lean_nat_dec_le(x_29, x_29);
if (x_33 == 0)
{
lean_object* x_34; 
lean_dec(x_29);
lean_dec(x_6);
x_34 = lean_array_push(x_30, x_28);
x_11 = x_34;
goto block_15;
}
else
{
size_t x_35; size_t x_36; lean_object* x_37; lean_object* x_38; 
x_35 = 0;
x_36 = lean_usize_of_nat(x_29);
lean_dec(x_29);
x_37 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Server_FileWorker_handleStaleDependency_spec__0(x_19, x_6, x_35, x_36, x_30);
lean_dec(x_6);
x_38 = lean_array_push(x_37, x_28);
x_11 = x_38;
goto block_15;
}
}
block_15:
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; 
x_12 = lean_st_ref_set(x_5, x_11);
x_13 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics(x_1, x_9);
x_14 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_14, 0, x_13);
return x_14;
}
}
else
{
lean_object* x_39; lean_object* x_40; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; uint8_t x_61; 
x_39 = lean_ctor_get(x_7, 0);
lean_inc(x_39);
lean_dec(x_7);
x_45 = lean_ctor_get(x_39, 0);
x_46 = lean_ctor_get(x_45, 3);
x_47 = lean_ctor_get(x_46, 0);
x_48 = l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__1;
x_49 = lean_unsigned_to_nat(0u);
x_50 = l_Lean_Server_FileWorker_setupImports___lam__0___closed__0;
x_51 = l_Lean_Server_FileWorker_setupImports___lam__0___closed__2;
x_52 = lean_string_utf8_byte_size(x_47);
lean_inc_ref(x_46);
x_53 = l_Lean_FileMap_utf8PosToLspPos(x_46, x_52);
lean_dec(x_52);
x_54 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_54, 0, x_50);
lean_ctor_set(x_54, 1, x_53);
x_55 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_55, 0, x_54);
x_56 = l_Lean_Server_FileWorker_setupImports___lam__0___closed__3;
x_57 = lean_box(0);
x_58 = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(x_58, 0, x_51);
lean_ctor_set(x_58, 1, x_55);
lean_ctor_set(x_58, 2, x_56);
lean_ctor_set(x_58, 3, x_57);
lean_ctor_set(x_58, 4, x_57);
lean_ctor_set(x_58, 5, x_57);
lean_ctor_set(x_58, 6, x_48);
lean_ctor_set(x_58, 7, x_57);
lean_ctor_set(x_58, 8, x_57);
lean_ctor_set(x_58, 9, x_57);
lean_ctor_set(x_58, 10, x_57);
x_59 = lean_array_get_size(x_6);
x_60 = l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__2;
x_61 = lean_nat_dec_lt(x_49, x_59);
if (x_61 == 0)
{
lean_object* x_62; 
lean_dec(x_59);
lean_dec(x_6);
x_62 = lean_array_push(x_60, x_58);
x_40 = x_62;
goto block_44;
}
else
{
uint8_t x_63; 
x_63 = lean_nat_dec_le(x_59, x_59);
if (x_63 == 0)
{
lean_object* x_64; 
lean_dec(x_59);
lean_dec(x_6);
x_64 = lean_array_push(x_60, x_58);
x_40 = x_64;
goto block_44;
}
else
{
size_t x_65; size_t x_66; lean_object* x_67; lean_object* x_68; 
x_65 = 0;
x_66 = lean_usize_of_nat(x_59);
lean_dec(x_59);
x_67 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Server_FileWorker_handleStaleDependency_spec__0(x_48, x_6, x_65, x_66, x_60);
lean_dec(x_6);
x_68 = lean_array_push(x_67, x_58);
x_40 = x_68;
goto block_44;
}
}
block_44:
{
lean_object* x_41; lean_object* x_42; lean_object* x_43; 
x_41 = lean_st_ref_set(x_5, x_40);
x_42 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics(x_1, x_39);
x_43 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_43, 0, x_42);
return x_43;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleStaleDependency(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_handleStaleDependency___redArg(x_2, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleStaleDependency___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_handleStaleDependency(x_1, x_2, x_3);
lean_dec(x_3);
lean_dec_ref(x_1);
return x_5;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Server_FileWorker_handleStaleDependency_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
size_t x_6; size_t x_7; lean_object* x_8; 
x_6 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_7 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_8 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Server_FileWorker_handleStaleDependency_spec__0(x_1, x_2, x_6, x_7, x_5);
lean_dec_ref(x_2);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleStaleDependency___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_FileWorker_handleStaleDependency___redArg(x_1, x_2);
lean_dec(x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_handleRpcRelease_spec__0___redArg(lean_object* x_1, uint64_t x_2) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint64_t x_7; uint8_t x_8; 
x_3 = lean_ctor_get(x_1, 1);
x_4 = lean_ctor_get(x_1, 2);
x_5 = lean_ctor_get(x_1, 3);
x_6 = lean_ctor_get(x_1, 4);
x_7 = lean_unbox_uint64(x_3);
x_8 = lean_uint64_dec_lt(x_2, x_7);
if (x_8 == 0)
{
uint64_t x_9; uint8_t x_10; 
x_9 = lean_unbox_uint64(x_3);
x_10 = lean_uint64_dec_eq(x_2, x_9);
if (x_10 == 0)
{
x_1 = x_6;
goto _start;
}
else
{
lean_object* x_12; 
lean_inc(x_4);
x_12 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_12, 0, x_4);
return x_12;
}
}
else
{
x_1 = x_5;
goto _start;
}
}
else
{
lean_object* x_14; 
x_14 = lean_box(0);
return x_14;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_handleRpcRelease_spec__1(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
uint8_t x_7; 
x_7 = lean_usize_dec_lt(x_4, x_3);
if (x_7 == 0)
{
lean_object* x_8; 
x_8 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_8, 0, x_5);
lean_ctor_set(x_8, 1, x_6);
return x_8;
}
else
{
lean_object* x_9; size_t x_10; lean_object* x_11; lean_object* x_12; size_t x_13; size_t x_14; 
x_9 = lean_array_uget(x_2, x_4);
x_10 = lean_unbox_usize(x_9);
lean_dec(x_9);
x_11 = l_Lean_Server_rpcReleaseRef(x_10, x_6);
x_12 = lean_ctor_get(x_11, 1);
lean_inc(x_12);
lean_dec_ref(x_11);
x_13 = 1;
x_14 = lean_usize_add(x_4, x_13);
{
size_t _tmp_3 = x_14;
lean_object* _tmp_4 = x_1;
lean_object* _tmp_5 = x_12;
x_4 = _tmp_3;
x_5 = _tmp_4;
x_6 = _tmp_5;
}
goto _start;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcRelease___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; lean_object* x_5; uint64_t x_6; lean_object* x_7; lean_object* x_8; 
x_4 = lean_st_ref_get(x_2);
x_5 = lean_ctor_get(x_4, 4);
lean_inc(x_5);
lean_dec(x_4);
x_6 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
x_7 = lean_ctor_get(x_1, 1);
x_8 = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_handleRpcRelease_spec__0___redArg(x_5, x_6);
lean_dec(x_5);
if (lean_obj_tag(x_8) == 1)
{
uint8_t x_9; 
x_9 = !lean_is_exclusive(x_8);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; 
x_10 = lean_ctor_get(x_8, 0);
x_11 = lean_io_mono_ms_now();
x_12 = lean_st_ref_take(x_10);
x_13 = l_Lean_Server_FileWorker_RpcSession_keptAlive(x_11, x_12);
lean_dec(x_11);
x_14 = !lean_is_exclusive(x_13);
if (x_14 == 0)
{
lean_object* x_15; lean_object* x_16; size_t x_17; size_t x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; 
x_15 = lean_ctor_get(x_13, 0);
x_16 = lean_box(0);
x_17 = lean_array_size(x_7);
x_18 = 0;
x_19 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_handleRpcRelease_spec__1(x_16, x_7, x_17, x_18, x_16, x_15);
x_20 = lean_ctor_get(x_19, 1);
lean_inc(x_20);
lean_dec_ref(x_19);
lean_ctor_set(x_13, 0, x_20);
x_21 = lean_st_ref_set(x_10, x_13);
lean_dec(x_10);
lean_ctor_set_tag(x_8, 0);
lean_ctor_set(x_8, 0, x_21);
return x_8;
}
else
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; size_t x_25; size_t x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; 
x_22 = lean_ctor_get(x_13, 0);
x_23 = lean_ctor_get(x_13, 1);
lean_inc(x_23);
lean_inc(x_22);
lean_dec(x_13);
x_24 = lean_box(0);
x_25 = lean_array_size(x_7);
x_26 = 0;
x_27 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_handleRpcRelease_spec__1(x_24, x_7, x_25, x_26, x_24, x_22);
x_28 = lean_ctor_get(x_27, 1);
lean_inc(x_28);
lean_dec_ref(x_27);
x_29 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_29, 0, x_28);
lean_ctor_set(x_29, 1, x_23);
x_30 = lean_st_ref_set(x_10, x_29);
lean_dec(x_10);
lean_ctor_set_tag(x_8, 0);
lean_ctor_set(x_8, 0, x_30);
return x_8;
}
}
else
{
lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; size_t x_39; size_t x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; 
x_31 = lean_ctor_get(x_8, 0);
lean_inc(x_31);
lean_dec(x_8);
x_32 = lean_io_mono_ms_now();
x_33 = lean_st_ref_take(x_31);
x_34 = l_Lean_Server_FileWorker_RpcSession_keptAlive(x_32, x_33);
lean_dec(x_32);
x_35 = lean_ctor_get(x_34, 0);
lean_inc_ref(x_35);
x_36 = lean_ctor_get(x_34, 1);
lean_inc(x_36);
if (lean_is_exclusive(x_34)) {
 lean_ctor_release(x_34, 0);
 lean_ctor_release(x_34, 1);
 x_37 = x_34;
} else {
 lean_dec_ref(x_34);
 x_37 = lean_box(0);
}
x_38 = lean_box(0);
x_39 = lean_array_size(x_7);
x_40 = 0;
x_41 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_handleRpcRelease_spec__1(x_38, x_7, x_39, x_40, x_38, x_35);
x_42 = lean_ctor_get(x_41, 1);
lean_inc(x_42);
lean_dec_ref(x_41);
if (lean_is_scalar(x_37)) {
 x_43 = lean_alloc_ctor(0, 2, 0);
} else {
 x_43 = x_37;
}
lean_ctor_set(x_43, 0, x_42);
lean_ctor_set(x_43, 1, x_36);
x_44 = lean_st_ref_set(x_31, x_43);
lean_dec(x_31);
x_45 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_45, 0, x_44);
return x_45;
}
}
else
{
lean_object* x_46; lean_object* x_47; 
lean_dec(x_8);
x_46 = lean_box(0);
x_47 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_47, 0, x_46);
return x_47;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcRelease(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_handleRpcRelease___redArg(x_1, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_handleRpcRelease_spec__0(lean_object* x_1, lean_object* x_2, uint64_t x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_handleRpcRelease_spec__0___redArg(x_2, x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcRelease___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_handleRpcRelease(x_1, x_2, x_3);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_handleRpcRelease_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint64_t x_4; lean_object* x_5; 
x_4 = lean_unbox_uint64(x_3);
lean_dec(x_3);
x_5 = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_handleRpcRelease_spec__0(x_1, x_2, x_4);
lean_dec(x_2);
return x_5;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_handleRpcRelease_spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
size_t x_7; size_t x_8; lean_object* x_9; 
x_7 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_8 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_9 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_handleRpcRelease_spec__1(x_1, x_2, x_7, x_8, x_5, x_6);
lean_dec_ref(x_2);
return x_9;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_handleRpcRelease_spec__0___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint64_t x_3; lean_object* x_4; 
x_3 = lean_unbox_uint64(x_2);
lean_dec(x_2);
x_4 = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_handleRpcRelease_spec__0___redArg(x_1, x_3);
lean_dec(x_1);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcRelease___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_FileWorker_handleRpcRelease___redArg(x_1, x_2);
lean_dec(x_2);
lean_dec_ref(x_1);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcKeepAlive___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; lean_object* x_5; uint64_t x_6; lean_object* x_7; 
x_4 = lean_st_ref_get(x_2);
x_5 = lean_ctor_get(x_4, 4);
lean_inc(x_5);
lean_dec(x_4);
x_6 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
x_7 = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_handleRpcRelease_spec__0___redArg(x_5, x_6);
lean_dec(x_5);
if (lean_obj_tag(x_7) == 0)
{
lean_object* x_8; lean_object* x_9; 
x_8 = lean_box(0);
x_9 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_9, 0, x_8);
return x_9;
}
else
{
uint8_t x_10; 
x_10 = !lean_is_exclusive(x_7);
if (x_10 == 0)
{
lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
x_11 = lean_ctor_get(x_7, 0);
x_12 = lean_io_mono_ms_now();
x_13 = lean_st_ref_take(x_11);
x_14 = l_Lean_Server_FileWorker_RpcSession_keptAlive(x_12, x_13);
lean_dec(x_12);
x_15 = lean_st_ref_set(x_11, x_14);
lean_dec(x_11);
lean_ctor_set_tag(x_7, 0);
lean_ctor_set(x_7, 0, x_15);
return x_7;
}
else
{
lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; 
x_16 = lean_ctor_get(x_7, 0);
lean_inc(x_16);
lean_dec(x_7);
x_17 = lean_io_mono_ms_now();
x_18 = lean_st_ref_take(x_16);
x_19 = l_Lean_Server_FileWorker_RpcSession_keptAlive(x_17, x_18);
lean_dec(x_17);
x_20 = lean_st_ref_set(x_16, x_19);
lean_dec(x_16);
x_21 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_21, 0, x_20);
return x_21;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcKeepAlive(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_handleRpcKeepAlive___redArg(x_1, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcKeepAlive___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_handleRpcKeepAlive(x_1, x_2, x_3);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcKeepAlive___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_FileWorker_handleRpcKeepAlive___redArg(x_1, x_2);
lean_dec(x_2);
lean_dec_ref(x_1);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_handleRpcConnect_spec__0___redArg(uint64_t x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint64_t x_10; uint8_t x_11; 
x_4 = lean_ctor_get(x_3, 0);
lean_inc(x_4);
x_5 = lean_ctor_get(x_3, 1);
lean_inc(x_5);
x_6 = lean_ctor_get(x_3, 2);
lean_inc(x_6);
x_7 = lean_ctor_get(x_3, 3);
lean_inc(x_7);
x_8 = lean_ctor_get(x_3, 4);
lean_inc(x_8);
if (lean_is_exclusive(x_3)) {
 lean_ctor_release(x_3, 0);
 lean_ctor_release(x_3, 1);
 lean_ctor_release(x_3, 2);
 lean_ctor_release(x_3, 3);
 lean_ctor_release(x_3, 4);
 x_9 = x_3;
} else {
 lean_dec_ref(x_3);
 x_9 = lean_box(0);
}
x_10 = lean_unbox_uint64(x_5);
x_11 = lean_uint64_dec_lt(x_1, x_10);
if (x_11 == 0)
{
uint64_t x_12; uint8_t x_13; 
x_12 = lean_unbox_uint64(x_5);
x_13 = lean_uint64_dec_eq(x_1, x_12);
if (x_13 == 0)
{
lean_object* x_14; lean_object* x_15; 
lean_dec(x_4);
x_14 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_handleRpcConnect_spec__0___redArg(x_1, x_2, x_8);
x_15 = lean_unsigned_to_nat(1u);
if (lean_obj_tag(x_7) == 0)
{
lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; 
x_16 = lean_ctor_get(x_7, 0);
x_17 = lean_ctor_get(x_14, 0);
lean_inc(x_17);
x_18 = lean_ctor_get(x_14, 1);
lean_inc(x_18);
x_19 = lean_ctor_get(x_14, 2);
lean_inc(x_19);
x_20 = lean_ctor_get(x_14, 3);
lean_inc(x_20);
x_21 = lean_ctor_get(x_14, 4);
lean_inc(x_21);
x_22 = lean_unsigned_to_nat(3u);
x_23 = lean_nat_mul(x_22, x_16);
x_24 = lean_nat_dec_lt(x_23, x_17);
lean_dec(x_23);
if (x_24 == 0)
{
lean_object* x_25; lean_object* x_26; lean_object* x_27; 
lean_dec(x_21);
lean_dec(x_20);
lean_dec(x_19);
lean_dec(x_18);
x_25 = lean_nat_add(x_15, x_16);
x_26 = lean_nat_add(x_25, x_17);
lean_dec(x_17);
lean_dec(x_25);
if (lean_is_scalar(x_9)) {
 x_27 = lean_alloc_ctor(0, 5, 0);
} else {
 x_27 = x_9;
}
lean_ctor_set(x_27, 0, x_26);
lean_ctor_set(x_27, 1, x_5);
lean_ctor_set(x_27, 2, x_6);
lean_ctor_set(x_27, 3, x_7);
lean_ctor_set(x_27, 4, x_14);
return x_27;
}
else
{
lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; uint8_t x_37; 
if (lean_is_exclusive(x_14)) {
 lean_ctor_release(x_14, 0);
 lean_ctor_release(x_14, 1);
 lean_ctor_release(x_14, 2);
 lean_ctor_release(x_14, 3);
 lean_ctor_release(x_14, 4);
 x_28 = x_14;
} else {
 lean_dec_ref(x_14);
 x_28 = lean_box(0);
}
x_29 = lean_ctor_get(x_20, 0);
x_30 = lean_ctor_get(x_20, 1);
x_31 = lean_ctor_get(x_20, 2);
x_32 = lean_ctor_get(x_20, 3);
x_33 = lean_ctor_get(x_20, 4);
x_34 = lean_ctor_get(x_21, 0);
x_35 = lean_unsigned_to_nat(2u);
x_36 = lean_nat_mul(x_35, x_34);
x_37 = lean_nat_dec_lt(x_29, x_36);
lean_dec(x_36);
if (x_37 == 0)
{
lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_48; 
lean_inc(x_33);
lean_inc(x_32);
lean_inc(x_31);
lean_inc(x_30);
if (lean_is_exclusive(x_20)) {
 lean_ctor_release(x_20, 0);
 lean_ctor_release(x_20, 1);
 lean_ctor_release(x_20, 2);
 lean_ctor_release(x_20, 3);
 lean_ctor_release(x_20, 4);
 x_38 = x_20;
} else {
 lean_dec_ref(x_20);
 x_38 = lean_box(0);
}
x_39 = lean_nat_add(x_15, x_16);
x_40 = lean_nat_add(x_39, x_17);
lean_dec(x_17);
if (lean_obj_tag(x_32) == 0)
{
lean_object* x_55; 
x_55 = lean_ctor_get(x_32, 0);
lean_inc(x_55);
x_48 = x_55;
goto block_54;
}
else
{
lean_object* x_56; 
x_56 = lean_unsigned_to_nat(0u);
x_48 = x_56;
goto block_54;
}
block_47:
{
lean_object* x_44; lean_object* x_45; lean_object* x_46; 
x_44 = lean_nat_add(x_42, x_43);
lean_dec(x_43);
lean_dec(x_42);
if (lean_is_scalar(x_38)) {
 x_45 = lean_alloc_ctor(0, 5, 0);
} else {
 x_45 = x_38;
}
lean_ctor_set(x_45, 0, x_44);
lean_ctor_set(x_45, 1, x_18);
lean_ctor_set(x_45, 2, x_19);
lean_ctor_set(x_45, 3, x_33);
lean_ctor_set(x_45, 4, x_21);
if (lean_is_scalar(x_28)) {
 x_46 = lean_alloc_ctor(0, 5, 0);
} else {
 x_46 = x_28;
}
lean_ctor_set(x_46, 0, x_40);
lean_ctor_set(x_46, 1, x_30);
lean_ctor_set(x_46, 2, x_31);
lean_ctor_set(x_46, 3, x_41);
lean_ctor_set(x_46, 4, x_45);
return x_46;
}
block_54:
{
lean_object* x_49; lean_object* x_50; lean_object* x_51; 
x_49 = lean_nat_add(x_39, x_48);
lean_dec(x_48);
lean_dec(x_39);
if (lean_is_scalar(x_9)) {
 x_50 = lean_alloc_ctor(0, 5, 0);
} else {
 x_50 = x_9;
}
lean_ctor_set(x_50, 0, x_49);
lean_ctor_set(x_50, 1, x_5);
lean_ctor_set(x_50, 2, x_6);
lean_ctor_set(x_50, 3, x_7);
lean_ctor_set(x_50, 4, x_32);
x_51 = lean_nat_add(x_15, x_34);
if (lean_obj_tag(x_33) == 0)
{
lean_object* x_52; 
x_52 = lean_ctor_get(x_33, 0);
lean_inc(x_52);
x_41 = x_50;
x_42 = x_51;
x_43 = x_52;
goto block_47;
}
else
{
lean_object* x_53; 
x_53 = lean_unsigned_to_nat(0u);
x_41 = x_50;
x_42 = x_51;
x_43 = x_53;
goto block_47;
}
}
}
else
{
lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; uint8_t x_61; 
lean_dec(x_9);
x_57 = lean_nat_add(x_15, x_16);
x_58 = lean_nat_add(x_57, x_17);
lean_dec(x_17);
x_59 = lean_nat_add(x_57, x_29);
lean_dec(x_57);
lean_inc_ref(x_7);
if (lean_is_scalar(x_28)) {
 x_60 = lean_alloc_ctor(0, 5, 0);
} else {
 x_60 = x_28;
}
lean_ctor_set(x_60, 0, x_59);
lean_ctor_set(x_60, 1, x_5);
lean_ctor_set(x_60, 2, x_6);
lean_ctor_set(x_60, 3, x_7);
lean_ctor_set(x_60, 4, x_20);
x_61 = !lean_is_exclusive(x_7);
if (x_61 == 0)
{
lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; 
x_62 = lean_ctor_get(x_7, 4);
lean_dec(x_62);
x_63 = lean_ctor_get(x_7, 3);
lean_dec(x_63);
x_64 = lean_ctor_get(x_7, 2);
lean_dec(x_64);
x_65 = lean_ctor_get(x_7, 1);
lean_dec(x_65);
x_66 = lean_ctor_get(x_7, 0);
lean_dec(x_66);
lean_ctor_set(x_7, 4, x_21);
lean_ctor_set(x_7, 3, x_60);
lean_ctor_set(x_7, 2, x_19);
lean_ctor_set(x_7, 1, x_18);
lean_ctor_set(x_7, 0, x_58);
return x_7;
}
else
{
lean_object* x_67; 
lean_dec(x_7);
x_67 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_67, 0, x_58);
lean_ctor_set(x_67, 1, x_18);
lean_ctor_set(x_67, 2, x_19);
lean_ctor_set(x_67, 3, x_60);
lean_ctor_set(x_67, 4, x_21);
return x_67;
}
}
}
}
else
{
lean_object* x_68; 
x_68 = lean_ctor_get(x_14, 3);
lean_inc(x_68);
if (lean_obj_tag(x_68) == 0)
{
uint8_t x_69; 
x_69 = !lean_is_exclusive(x_14);
if (x_69 == 0)
{
lean_object* x_70; lean_object* x_71; lean_object* x_72; uint8_t x_73; 
x_70 = lean_ctor_get(x_14, 4);
x_71 = lean_ctor_get(x_14, 3);
lean_dec(x_71);
x_72 = lean_ctor_get(x_14, 0);
lean_dec(x_72);
x_73 = !lean_is_exclusive(x_68);
if (x_73 == 0)
{
lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; 
x_74 = lean_ctor_get(x_68, 1);
x_75 = lean_ctor_get(x_68, 2);
x_76 = lean_ctor_get(x_68, 4);
lean_dec(x_76);
x_77 = lean_ctor_get(x_68, 3);
lean_dec(x_77);
x_78 = lean_ctor_get(x_68, 0);
lean_dec(x_78);
x_79 = lean_unsigned_to_nat(3u);
lean_inc_n(x_70, 2);
lean_ctor_set(x_68, 4, x_70);
lean_ctor_set(x_68, 3, x_70);
lean_ctor_set(x_68, 2, x_6);
lean_ctor_set(x_68, 1, x_5);
lean_ctor_set(x_68, 0, x_15);
lean_inc(x_70);
lean_ctor_set(x_14, 3, x_70);
lean_ctor_set(x_14, 0, x_15);
if (lean_is_scalar(x_9)) {
 x_80 = lean_alloc_ctor(0, 5, 0);
} else {
 x_80 = x_9;
}
lean_ctor_set(x_80, 0, x_79);
lean_ctor_set(x_80, 1, x_74);
lean_ctor_set(x_80, 2, x_75);
lean_ctor_set(x_80, 3, x_68);
lean_ctor_set(x_80, 4, x_14);
return x_80;
}
else
{
lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; 
x_81 = lean_ctor_get(x_68, 1);
x_82 = lean_ctor_get(x_68, 2);
lean_inc(x_82);
lean_inc(x_81);
lean_dec(x_68);
x_83 = lean_unsigned_to_nat(3u);
lean_inc_n(x_70, 2);
x_84 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_84, 0, x_15);
lean_ctor_set(x_84, 1, x_5);
lean_ctor_set(x_84, 2, x_6);
lean_ctor_set(x_84, 3, x_70);
lean_ctor_set(x_84, 4, x_70);
lean_inc(x_70);
lean_ctor_set(x_14, 3, x_70);
lean_ctor_set(x_14, 0, x_15);
if (lean_is_scalar(x_9)) {
 x_85 = lean_alloc_ctor(0, 5, 0);
} else {
 x_85 = x_9;
}
lean_ctor_set(x_85, 0, x_83);
lean_ctor_set(x_85, 1, x_81);
lean_ctor_set(x_85, 2, x_82);
lean_ctor_set(x_85, 3, x_84);
lean_ctor_set(x_85, 4, x_14);
return x_85;
}
}
else
{
lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; 
x_86 = lean_ctor_get(x_14, 4);
x_87 = lean_ctor_get(x_14, 1);
x_88 = lean_ctor_get(x_14, 2);
lean_inc(x_86);
lean_inc(x_88);
lean_inc(x_87);
lean_dec(x_14);
x_89 = lean_ctor_get(x_68, 1);
lean_inc(x_89);
x_90 = lean_ctor_get(x_68, 2);
lean_inc(x_90);
if (lean_is_exclusive(x_68)) {
 lean_ctor_release(x_68, 0);
 lean_ctor_release(x_68, 1);
 lean_ctor_release(x_68, 2);
 lean_ctor_release(x_68, 3);
 lean_ctor_release(x_68, 4);
 x_91 = x_68;
} else {
 lean_dec_ref(x_68);
 x_91 = lean_box(0);
}
x_92 = lean_unsigned_to_nat(3u);
lean_inc_n(x_86, 2);
if (lean_is_scalar(x_91)) {
 x_93 = lean_alloc_ctor(0, 5, 0);
} else {
 x_93 = x_91;
}
lean_ctor_set(x_93, 0, x_15);
lean_ctor_set(x_93, 1, x_5);
lean_ctor_set(x_93, 2, x_6);
lean_ctor_set(x_93, 3, x_86);
lean_ctor_set(x_93, 4, x_86);
lean_inc(x_86);
x_94 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_94, 0, x_15);
lean_ctor_set(x_94, 1, x_87);
lean_ctor_set(x_94, 2, x_88);
lean_ctor_set(x_94, 3, x_86);
lean_ctor_set(x_94, 4, x_86);
if (lean_is_scalar(x_9)) {
 x_95 = lean_alloc_ctor(0, 5, 0);
} else {
 x_95 = x_9;
}
lean_ctor_set(x_95, 0, x_92);
lean_ctor_set(x_95, 1, x_89);
lean_ctor_set(x_95, 2, x_90);
lean_ctor_set(x_95, 3, x_93);
lean_ctor_set(x_95, 4, x_94);
return x_95;
}
}
else
{
lean_object* x_96; 
x_96 = lean_ctor_get(x_14, 4);
lean_inc(x_96);
if (lean_obj_tag(x_96) == 0)
{
uint8_t x_97; 
x_97 = !lean_is_exclusive(x_14);
if (x_97 == 0)
{
lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; 
x_98 = lean_ctor_get(x_14, 1);
x_99 = lean_ctor_get(x_14, 2);
x_100 = lean_ctor_get(x_14, 4);
lean_dec(x_100);
x_101 = lean_ctor_get(x_14, 3);
lean_dec(x_101);
x_102 = lean_ctor_get(x_14, 0);
lean_dec(x_102);
x_103 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_14, 4, x_68);
lean_ctor_set(x_14, 2, x_6);
lean_ctor_set(x_14, 1, x_5);
lean_ctor_set(x_14, 0, x_15);
if (lean_is_scalar(x_9)) {
 x_104 = lean_alloc_ctor(0, 5, 0);
} else {
 x_104 = x_9;
}
lean_ctor_set(x_104, 0, x_103);
lean_ctor_set(x_104, 1, x_98);
lean_ctor_set(x_104, 2, x_99);
lean_ctor_set(x_104, 3, x_14);
lean_ctor_set(x_104, 4, x_96);
return x_104;
}
else
{
lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; 
x_105 = lean_ctor_get(x_14, 1);
x_106 = lean_ctor_get(x_14, 2);
lean_inc(x_106);
lean_inc(x_105);
lean_dec(x_14);
x_107 = lean_unsigned_to_nat(3u);
x_108 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_108, 0, x_15);
lean_ctor_set(x_108, 1, x_5);
lean_ctor_set(x_108, 2, x_6);
lean_ctor_set(x_108, 3, x_68);
lean_ctor_set(x_108, 4, x_68);
if (lean_is_scalar(x_9)) {
 x_109 = lean_alloc_ctor(0, 5, 0);
} else {
 x_109 = x_9;
}
lean_ctor_set(x_109, 0, x_107);
lean_ctor_set(x_109, 1, x_105);
lean_ctor_set(x_109, 2, x_106);
lean_ctor_set(x_109, 3, x_108);
lean_ctor_set(x_109, 4, x_96);
return x_109;
}
}
else
{
lean_object* x_110; lean_object* x_111; 
x_110 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_9)) {
 x_111 = lean_alloc_ctor(0, 5, 0);
} else {
 x_111 = x_9;
}
lean_ctor_set(x_111, 0, x_110);
lean_ctor_set(x_111, 1, x_5);
lean_ctor_set(x_111, 2, x_6);
lean_ctor_set(x_111, 3, x_96);
lean_ctor_set(x_111, 4, x_14);
return x_111;
}
}
}
}
else
{
lean_object* x_112; lean_object* x_113; 
lean_dec(x_6);
lean_dec(x_5);
x_112 = lean_box_uint64(x_1);
if (lean_is_scalar(x_9)) {
 x_113 = lean_alloc_ctor(0, 5, 0);
} else {
 x_113 = x_9;
}
lean_ctor_set(x_113, 0, x_4);
lean_ctor_set(x_113, 1, x_112);
lean_ctor_set(x_113, 2, x_2);
lean_ctor_set(x_113, 3, x_7);
lean_ctor_set(x_113, 4, x_8);
return x_113;
}
}
else
{
lean_object* x_114; lean_object* x_115; 
lean_dec(x_4);
x_114 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_handleRpcConnect_spec__0___redArg(x_1, x_2, x_7);
x_115 = lean_unsigned_to_nat(1u);
if (lean_obj_tag(x_8) == 0)
{
lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; uint8_t x_124; 
x_116 = lean_ctor_get(x_8, 0);
x_117 = lean_ctor_get(x_114, 0);
lean_inc(x_117);
x_118 = lean_ctor_get(x_114, 1);
lean_inc(x_118);
x_119 = lean_ctor_get(x_114, 2);
lean_inc(x_119);
x_120 = lean_ctor_get(x_114, 3);
lean_inc(x_120);
x_121 = lean_ctor_get(x_114, 4);
lean_inc(x_121);
x_122 = lean_unsigned_to_nat(3u);
x_123 = lean_nat_mul(x_122, x_116);
x_124 = lean_nat_dec_lt(x_123, x_117);
lean_dec(x_123);
if (x_124 == 0)
{
lean_object* x_125; lean_object* x_126; lean_object* x_127; 
lean_dec(x_121);
lean_dec(x_120);
lean_dec(x_119);
lean_dec(x_118);
x_125 = lean_nat_add(x_115, x_117);
lean_dec(x_117);
x_126 = lean_nat_add(x_125, x_116);
lean_dec(x_125);
if (lean_is_scalar(x_9)) {
 x_127 = lean_alloc_ctor(0, 5, 0);
} else {
 x_127 = x_9;
}
lean_ctor_set(x_127, 0, x_126);
lean_ctor_set(x_127, 1, x_5);
lean_ctor_set(x_127, 2, x_6);
lean_ctor_set(x_127, 3, x_114);
lean_ctor_set(x_127, 4, x_8);
return x_127;
}
else
{
lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; uint8_t x_137; 
if (lean_is_exclusive(x_114)) {
 lean_ctor_release(x_114, 0);
 lean_ctor_release(x_114, 1);
 lean_ctor_release(x_114, 2);
 lean_ctor_release(x_114, 3);
 lean_ctor_release(x_114, 4);
 x_128 = x_114;
} else {
 lean_dec_ref(x_114);
 x_128 = lean_box(0);
}
x_129 = lean_ctor_get(x_120, 0);
x_130 = lean_ctor_get(x_121, 0);
x_131 = lean_ctor_get(x_121, 1);
x_132 = lean_ctor_get(x_121, 2);
x_133 = lean_ctor_get(x_121, 3);
x_134 = lean_ctor_get(x_121, 4);
x_135 = lean_unsigned_to_nat(2u);
x_136 = lean_nat_mul(x_135, x_129);
x_137 = lean_nat_dec_lt(x_130, x_136);
lean_dec(x_136);
if (x_137 == 0)
{
lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_148; lean_object* x_149; 
lean_inc(x_134);
lean_inc(x_133);
lean_inc(x_132);
lean_inc(x_131);
if (lean_is_exclusive(x_121)) {
 lean_ctor_release(x_121, 0);
 lean_ctor_release(x_121, 1);
 lean_ctor_release(x_121, 2);
 lean_ctor_release(x_121, 3);
 lean_ctor_release(x_121, 4);
 x_138 = x_121;
} else {
 lean_dec_ref(x_121);
 x_138 = lean_box(0);
}
x_139 = lean_nat_add(x_115, x_117);
lean_dec(x_117);
x_140 = lean_nat_add(x_139, x_116);
lean_dec(x_139);
x_148 = lean_nat_add(x_115, x_129);
if (lean_obj_tag(x_133) == 0)
{
lean_object* x_156; 
x_156 = lean_ctor_get(x_133, 0);
lean_inc(x_156);
x_149 = x_156;
goto block_155;
}
else
{
lean_object* x_157; 
x_157 = lean_unsigned_to_nat(0u);
x_149 = x_157;
goto block_155;
}
block_147:
{
lean_object* x_144; lean_object* x_145; lean_object* x_146; 
x_144 = lean_nat_add(x_142, x_143);
lean_dec(x_143);
lean_dec(x_142);
if (lean_is_scalar(x_138)) {
 x_145 = lean_alloc_ctor(0, 5, 0);
} else {
 x_145 = x_138;
}
lean_ctor_set(x_145, 0, x_144);
lean_ctor_set(x_145, 1, x_5);
lean_ctor_set(x_145, 2, x_6);
lean_ctor_set(x_145, 3, x_134);
lean_ctor_set(x_145, 4, x_8);
if (lean_is_scalar(x_128)) {
 x_146 = lean_alloc_ctor(0, 5, 0);
} else {
 x_146 = x_128;
}
lean_ctor_set(x_146, 0, x_140);
lean_ctor_set(x_146, 1, x_131);
lean_ctor_set(x_146, 2, x_132);
lean_ctor_set(x_146, 3, x_141);
lean_ctor_set(x_146, 4, x_145);
return x_146;
}
block_155:
{
lean_object* x_150; lean_object* x_151; lean_object* x_152; 
x_150 = lean_nat_add(x_148, x_149);
lean_dec(x_149);
lean_dec(x_148);
if (lean_is_scalar(x_9)) {
 x_151 = lean_alloc_ctor(0, 5, 0);
} else {
 x_151 = x_9;
}
lean_ctor_set(x_151, 0, x_150);
lean_ctor_set(x_151, 1, x_118);
lean_ctor_set(x_151, 2, x_119);
lean_ctor_set(x_151, 3, x_120);
lean_ctor_set(x_151, 4, x_133);
x_152 = lean_nat_add(x_115, x_116);
if (lean_obj_tag(x_134) == 0)
{
lean_object* x_153; 
x_153 = lean_ctor_get(x_134, 0);
lean_inc(x_153);
x_141 = x_151;
x_142 = x_152;
x_143 = x_153;
goto block_147;
}
else
{
lean_object* x_154; 
x_154 = lean_unsigned_to_nat(0u);
x_141 = x_151;
x_142 = x_152;
x_143 = x_154;
goto block_147;
}
}
}
else
{
lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; uint8_t x_163; 
lean_dec(x_9);
x_158 = lean_nat_add(x_115, x_117);
lean_dec(x_117);
x_159 = lean_nat_add(x_158, x_116);
lean_dec(x_158);
x_160 = lean_nat_add(x_115, x_116);
x_161 = lean_nat_add(x_160, x_130);
lean_dec(x_160);
lean_inc_ref(x_8);
if (lean_is_scalar(x_128)) {
 x_162 = lean_alloc_ctor(0, 5, 0);
} else {
 x_162 = x_128;
}
lean_ctor_set(x_162, 0, x_161);
lean_ctor_set(x_162, 1, x_5);
lean_ctor_set(x_162, 2, x_6);
lean_ctor_set(x_162, 3, x_121);
lean_ctor_set(x_162, 4, x_8);
x_163 = !lean_is_exclusive(x_8);
if (x_163 == 0)
{
lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; 
x_164 = lean_ctor_get(x_8, 4);
lean_dec(x_164);
x_165 = lean_ctor_get(x_8, 3);
lean_dec(x_165);
x_166 = lean_ctor_get(x_8, 2);
lean_dec(x_166);
x_167 = lean_ctor_get(x_8, 1);
lean_dec(x_167);
x_168 = lean_ctor_get(x_8, 0);
lean_dec(x_168);
lean_ctor_set(x_8, 4, x_162);
lean_ctor_set(x_8, 3, x_120);
lean_ctor_set(x_8, 2, x_119);
lean_ctor_set(x_8, 1, x_118);
lean_ctor_set(x_8, 0, x_159);
return x_8;
}
else
{
lean_object* x_169; 
lean_dec(x_8);
x_169 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_169, 0, x_159);
lean_ctor_set(x_169, 1, x_118);
lean_ctor_set(x_169, 2, x_119);
lean_ctor_set(x_169, 3, x_120);
lean_ctor_set(x_169, 4, x_162);
return x_169;
}
}
}
}
else
{
lean_object* x_170; 
x_170 = lean_ctor_get(x_114, 3);
lean_inc(x_170);
if (lean_obj_tag(x_170) == 0)
{
uint8_t x_171; 
x_171 = !lean_is_exclusive(x_114);
if (x_171 == 0)
{
lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; 
x_172 = lean_ctor_get(x_114, 4);
x_173 = lean_ctor_get(x_114, 1);
x_174 = lean_ctor_get(x_114, 2);
x_175 = lean_ctor_get(x_114, 3);
lean_dec(x_175);
x_176 = lean_ctor_get(x_114, 0);
lean_dec(x_176);
x_177 = lean_unsigned_to_nat(3u);
lean_inc(x_172);
lean_ctor_set(x_114, 3, x_172);
lean_ctor_set(x_114, 2, x_6);
lean_ctor_set(x_114, 1, x_5);
lean_ctor_set(x_114, 0, x_115);
if (lean_is_scalar(x_9)) {
 x_178 = lean_alloc_ctor(0, 5, 0);
} else {
 x_178 = x_9;
}
lean_ctor_set(x_178, 0, x_177);
lean_ctor_set(x_178, 1, x_173);
lean_ctor_set(x_178, 2, x_174);
lean_ctor_set(x_178, 3, x_170);
lean_ctor_set(x_178, 4, x_114);
return x_178;
}
else
{
lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; 
x_179 = lean_ctor_get(x_114, 4);
x_180 = lean_ctor_get(x_114, 1);
x_181 = lean_ctor_get(x_114, 2);
lean_inc(x_179);
lean_inc(x_181);
lean_inc(x_180);
lean_dec(x_114);
x_182 = lean_unsigned_to_nat(3u);
lean_inc(x_179);
x_183 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_183, 0, x_115);
lean_ctor_set(x_183, 1, x_5);
lean_ctor_set(x_183, 2, x_6);
lean_ctor_set(x_183, 3, x_179);
lean_ctor_set(x_183, 4, x_179);
if (lean_is_scalar(x_9)) {
 x_184 = lean_alloc_ctor(0, 5, 0);
} else {
 x_184 = x_9;
}
lean_ctor_set(x_184, 0, x_182);
lean_ctor_set(x_184, 1, x_180);
lean_ctor_set(x_184, 2, x_181);
lean_ctor_set(x_184, 3, x_170);
lean_ctor_set(x_184, 4, x_183);
return x_184;
}
}
else
{
lean_object* x_185; 
x_185 = lean_ctor_get(x_114, 4);
lean_inc(x_185);
if (lean_obj_tag(x_185) == 0)
{
uint8_t x_186; 
x_186 = !lean_is_exclusive(x_114);
if (x_186 == 0)
{
lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; uint8_t x_192; 
x_187 = lean_ctor_get(x_114, 1);
x_188 = lean_ctor_get(x_114, 2);
x_189 = lean_ctor_get(x_114, 4);
lean_dec(x_189);
x_190 = lean_ctor_get(x_114, 3);
lean_dec(x_190);
x_191 = lean_ctor_get(x_114, 0);
lean_dec(x_191);
x_192 = !lean_is_exclusive(x_185);
if (x_192 == 0)
{
lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; 
x_193 = lean_ctor_get(x_185, 1);
x_194 = lean_ctor_get(x_185, 2);
x_195 = lean_ctor_get(x_185, 4);
lean_dec(x_195);
x_196 = lean_ctor_get(x_185, 3);
lean_dec(x_196);
x_197 = lean_ctor_get(x_185, 0);
lean_dec(x_197);
x_198 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_185, 4, x_170);
lean_ctor_set(x_185, 3, x_170);
lean_ctor_set(x_185, 2, x_188);
lean_ctor_set(x_185, 1, x_187);
lean_ctor_set(x_185, 0, x_115);
lean_ctor_set(x_114, 4, x_170);
lean_ctor_set(x_114, 2, x_6);
lean_ctor_set(x_114, 1, x_5);
lean_ctor_set(x_114, 0, x_115);
if (lean_is_scalar(x_9)) {
 x_199 = lean_alloc_ctor(0, 5, 0);
} else {
 x_199 = x_9;
}
lean_ctor_set(x_199, 0, x_198);
lean_ctor_set(x_199, 1, x_193);
lean_ctor_set(x_199, 2, x_194);
lean_ctor_set(x_199, 3, x_185);
lean_ctor_set(x_199, 4, x_114);
return x_199;
}
else
{
lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; 
x_200 = lean_ctor_get(x_185, 1);
x_201 = lean_ctor_get(x_185, 2);
lean_inc(x_201);
lean_inc(x_200);
lean_dec(x_185);
x_202 = lean_unsigned_to_nat(3u);
x_203 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_203, 0, x_115);
lean_ctor_set(x_203, 1, x_187);
lean_ctor_set(x_203, 2, x_188);
lean_ctor_set(x_203, 3, x_170);
lean_ctor_set(x_203, 4, x_170);
lean_ctor_set(x_114, 4, x_170);
lean_ctor_set(x_114, 2, x_6);
lean_ctor_set(x_114, 1, x_5);
lean_ctor_set(x_114, 0, x_115);
if (lean_is_scalar(x_9)) {
 x_204 = lean_alloc_ctor(0, 5, 0);
} else {
 x_204 = x_9;
}
lean_ctor_set(x_204, 0, x_202);
lean_ctor_set(x_204, 1, x_200);
lean_ctor_set(x_204, 2, x_201);
lean_ctor_set(x_204, 3, x_203);
lean_ctor_set(x_204, 4, x_114);
return x_204;
}
}
else
{
lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; 
x_205 = lean_ctor_get(x_114, 1);
x_206 = lean_ctor_get(x_114, 2);
lean_inc(x_206);
lean_inc(x_205);
lean_dec(x_114);
x_207 = lean_ctor_get(x_185, 1);
lean_inc(x_207);
x_208 = lean_ctor_get(x_185, 2);
lean_inc(x_208);
if (lean_is_exclusive(x_185)) {
 lean_ctor_release(x_185, 0);
 lean_ctor_release(x_185, 1);
 lean_ctor_release(x_185, 2);
 lean_ctor_release(x_185, 3);
 lean_ctor_release(x_185, 4);
 x_209 = x_185;
} else {
 lean_dec_ref(x_185);
 x_209 = lean_box(0);
}
x_210 = lean_unsigned_to_nat(3u);
if (lean_is_scalar(x_209)) {
 x_211 = lean_alloc_ctor(0, 5, 0);
} else {
 x_211 = x_209;
}
lean_ctor_set(x_211, 0, x_115);
lean_ctor_set(x_211, 1, x_205);
lean_ctor_set(x_211, 2, x_206);
lean_ctor_set(x_211, 3, x_170);
lean_ctor_set(x_211, 4, x_170);
x_212 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_212, 0, x_115);
lean_ctor_set(x_212, 1, x_5);
lean_ctor_set(x_212, 2, x_6);
lean_ctor_set(x_212, 3, x_170);
lean_ctor_set(x_212, 4, x_170);
if (lean_is_scalar(x_9)) {
 x_213 = lean_alloc_ctor(0, 5, 0);
} else {
 x_213 = x_9;
}
lean_ctor_set(x_213, 0, x_210);
lean_ctor_set(x_213, 1, x_207);
lean_ctor_set(x_213, 2, x_208);
lean_ctor_set(x_213, 3, x_211);
lean_ctor_set(x_213, 4, x_212);
return x_213;
}
}
else
{
lean_object* x_214; lean_object* x_215; 
x_214 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_9)) {
 x_215 = lean_alloc_ctor(0, 5, 0);
} else {
 x_215 = x_9;
}
lean_ctor_set(x_215, 0, x_214);
lean_ctor_set(x_215, 1, x_5);
lean_ctor_set(x_215, 2, x_6);
lean_ctor_set(x_215, 3, x_114);
lean_ctor_set(x_215, 4, x_185);
return x_215;
}
}
}
}
}
else
{
lean_object* x_216; lean_object* x_217; lean_object* x_218; 
x_216 = lean_unsigned_to_nat(1u);
x_217 = lean_box_uint64(x_1);
x_218 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_218, 0, x_216);
lean_ctor_set(x_218, 1, x_217);
lean_ctor_set(x_218, 2, x_2);
lean_ctor_set(x_218, 3, x_3);
lean_ctor_set(x_218, 4, x_3);
return x_218;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcConnect___redArg(lean_object* x_1) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Server_FileWorker_RpcSession_new();
if (lean_obj_tag(x_3) == 0)
{
uint8_t x_4; 
x_4 = !lean_is_exclusive(x_3);
if (x_4 == 0)
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; 
x_5 = lean_ctor_get(x_3, 0);
x_6 = lean_ctor_get(x_5, 0);
lean_inc(x_6);
x_7 = lean_ctor_get(x_5, 1);
lean_inc(x_7);
lean_dec(x_5);
x_8 = lean_st_mk_ref(x_7);
x_9 = lean_st_ref_take(x_1);
x_10 = !lean_is_exclusive(x_9);
if (x_10 == 0)
{
lean_object* x_11; uint64_t x_12; lean_object* x_13; lean_object* x_14; 
x_11 = lean_ctor_get(x_9, 4);
x_12 = lean_unbox_uint64(x_6);
x_13 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_handleRpcConnect_spec__0___redArg(x_12, x_8, x_11);
lean_ctor_set(x_9, 4, x_13);
x_14 = lean_st_ref_set(x_1, x_9);
lean_ctor_set(x_3, 0, x_6);
return x_3;
}
else
{
lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint64_t x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; 
x_15 = lean_ctor_get(x_9, 0);
x_16 = lean_ctor_get(x_9, 1);
x_17 = lean_ctor_get(x_9, 2);
x_18 = lean_ctor_get(x_9, 3);
x_19 = lean_ctor_get(x_9, 4);
lean_inc(x_19);
lean_inc(x_18);
lean_inc(x_17);
lean_inc(x_16);
lean_inc(x_15);
lean_dec(x_9);
x_20 = lean_unbox_uint64(x_6);
x_21 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_handleRpcConnect_spec__0___redArg(x_20, x_8, x_19);
x_22 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_22, 0, x_15);
lean_ctor_set(x_22, 1, x_16);
lean_ctor_set(x_22, 2, x_17);
lean_ctor_set(x_22, 3, x_18);
lean_ctor_set(x_22, 4, x_21);
x_23 = lean_st_ref_set(x_1, x_22);
lean_ctor_set(x_3, 0, x_6);
return x_3;
}
}
else
{
lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint64_t x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; 
x_24 = lean_ctor_get(x_3, 0);
lean_inc(x_24);
lean_dec(x_3);
x_25 = lean_ctor_get(x_24, 0);
lean_inc(x_25);
x_26 = lean_ctor_get(x_24, 1);
lean_inc(x_26);
lean_dec(x_24);
x_27 = lean_st_mk_ref(x_26);
x_28 = lean_st_ref_take(x_1);
x_29 = lean_ctor_get(x_28, 0);
lean_inc_ref(x_29);
x_30 = lean_ctor_get(x_28, 1);
lean_inc(x_30);
x_31 = lean_ctor_get(x_28, 2);
lean_inc(x_31);
x_32 = lean_ctor_get(x_28, 3);
lean_inc(x_32);
x_33 = lean_ctor_get(x_28, 4);
lean_inc(x_33);
if (lean_is_exclusive(x_28)) {
 lean_ctor_release(x_28, 0);
 lean_ctor_release(x_28, 1);
 lean_ctor_release(x_28, 2);
 lean_ctor_release(x_28, 3);
 lean_ctor_release(x_28, 4);
 x_34 = x_28;
} else {
 lean_dec_ref(x_28);
 x_34 = lean_box(0);
}
x_35 = lean_unbox_uint64(x_25);
x_36 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_handleRpcConnect_spec__0___redArg(x_35, x_27, x_33);
if (lean_is_scalar(x_34)) {
 x_37 = lean_alloc_ctor(0, 5, 0);
} else {
 x_37 = x_34;
}
lean_ctor_set(x_37, 0, x_29);
lean_ctor_set(x_37, 1, x_30);
lean_ctor_set(x_37, 2, x_31);
lean_ctor_set(x_37, 3, x_32);
lean_ctor_set(x_37, 4, x_36);
x_38 = lean_st_ref_set(x_1, x_37);
x_39 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_39, 0, x_25);
return x_39;
}
}
else
{
uint8_t x_40; 
x_40 = !lean_is_exclusive(x_3);
if (x_40 == 0)
{
return x_3;
}
else
{
lean_object* x_41; lean_object* x_42; 
x_41 = lean_ctor_get(x_3, 0);
lean_inc(x_41);
lean_dec(x_3);
x_42 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_42, 0, x_41);
return x_42;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcConnect(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_handleRpcConnect___redArg(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_handleRpcConnect_spec__0(lean_object* x_1, uint64_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_handleRpcConnect_spec__0___redArg(x_2, x_3, x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcConnect___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_handleRpcConnect(x_1, x_2, x_3);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_handleRpcConnect_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint64_t x_6; lean_object* x_7; 
x_6 = lean_unbox_uint64(x_2);
lean_dec(x_2);
x_7 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_handleRpcConnect_spec__0(x_1, x_6, x_3, x_4, x_5);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRpcConnect___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Server_FileWorker_handleRpcConnect___redArg(x_1);
lean_dec(x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_handleRpcConnect_spec__0___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint64_t x_4; lean_object* x_5; 
x_4 = lean_unbox_uint64(x_1);
lean_dec(x_1);
x_5 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_handleRpcConnect_spec__0___redArg(x_4, x_2, x_3);
return x_5;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_parseParams___redArg___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Got param with wrong structure: ", 32, 32);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_parseParams___redArg___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("\n", 1, 1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; 
lean_inc(x_2);
x_4 = lean_apply_1(x_1, x_2);
if (lean_obj_tag(x_4) == 0)
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
lean_dec_ref(x_4);
x_6 = l_Lean_Server_FileWorker_parseParams___redArg___closed__0;
x_7 = l_Lean_Json_compress(x_2);
x_8 = lean_string_append(x_6, x_7);
lean_dec_ref(x_7);
x_9 = l_Lean_Server_FileWorker_parseParams___redArg___closed__1;
x_10 = lean_string_append(x_8, x_9);
x_11 = lean_string_append(x_10, x_5);
lean_dec(x_5);
x_12 = l_IO_throwServerError___redArg(x_11);
return x_12;
}
else
{
uint8_t x_13; 
lean_dec(x_2);
x_13 = !lean_is_exclusive(x_4);
if (x_13 == 0)
{
lean_ctor_set_tag(x_4, 0);
return x_4;
}
else
{
lean_object* x_14; lean_object* x_15; 
x_14 = lean_ctor_get(x_4, 0);
lean_inc(x_14);
lean_dec(x_4);
x_15 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_15, 0, x_14);
return x_15;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_Server_FileWorker_parseParams___redArg(x_2, x_3);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_Server_FileWorker_parseParams(x_1, x_2, x_3, x_4, x_5);
lean_dec(x_5);
lean_dec_ref(x_4);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_FileWorker_parseParams___redArg(x_1, x_2);
return x_4;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("textDocument/didChange", 22, 22);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("$/cancelRequest", 15, 15);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("$/lean/staleDependency", 22, 22);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__3() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("$/lean/rpc/release", 18, 18);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__4() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("$/lean/rpc/keepAlive", 20, 20);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__5() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Got unsupported notification method: ", 37, 37);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__6() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lean_Lsp_instFromJsonRpcKeepAliveParams_fromJson), 1, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__7() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRpcKeepAlive___boxed), 4, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__8() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lean_Lsp_instFromJsonRpcReleaseParams_fromJson), 1, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__9() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRpcRelease___boxed), 4, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__10() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lean_Lsp_instFromJsonLeanStaleDependencyParams_fromJson), 1, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__11() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleStaleDependency___boxed), 4, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__12() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lean_Lsp_instFromJsonCancelParams_fromJson), 1, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__13() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleCancelRequest___boxed), 4, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__14() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lean_Lsp_instFromJsonDidChangeTextDocumentParams_fromJson), 1, 0);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleNotification___closed__15() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleDidChange___boxed), 4, 0);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleNotification(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_18; uint8_t x_19; 
x_18 = l_Lean_Server_FileWorker_handleNotification___closed__0;
x_19 = lean_string_dec_eq(x_1, x_18);
if (x_19 == 0)
{
lean_object* x_20; uint8_t x_21; 
x_20 = l_Lean_Server_FileWorker_handleNotification___closed__1;
x_21 = lean_string_dec_eq(x_1, x_20);
if (x_21 == 0)
{
lean_object* x_22; uint8_t x_23; 
x_22 = l_Lean_Server_FileWorker_handleNotification___closed__2;
x_23 = lean_string_dec_eq(x_1, x_22);
if (x_23 == 0)
{
lean_object* x_24; uint8_t x_25; 
x_24 = l_Lean_Server_FileWorker_handleNotification___closed__3;
x_25 = lean_string_dec_eq(x_1, x_24);
if (x_25 == 0)
{
lean_object* x_26; uint8_t x_27; 
x_26 = l_Lean_Server_FileWorker_handleNotification___closed__4;
x_27 = lean_string_dec_eq(x_1, x_26);
if (x_27 == 0)
{
lean_object* x_28; lean_object* x_29; lean_object* x_30; 
lean_dec(x_4);
lean_dec_ref(x_3);
lean_dec(x_2);
x_28 = l_Lean_Server_FileWorker_handleNotification___closed__5;
x_29 = lean_string_append(x_28, x_1);
x_30 = l_IO_throwServerError___redArg(x_29);
return x_30;
}
else
{
lean_object* x_31; lean_object* x_32; 
x_31 = l_Lean_Server_FileWorker_handleNotification___closed__6;
x_32 = l_Lean_Server_FileWorker_handleNotification___closed__7;
x_6 = x_31;
x_7 = x_32;
x_8 = x_3;
x_9 = x_4;
x_10 = lean_box(0);
goto block_17;
}
}
else
{
lean_object* x_33; lean_object* x_34; 
x_33 = l_Lean_Server_FileWorker_handleNotification___closed__8;
x_34 = l_Lean_Server_FileWorker_handleNotification___closed__9;
x_6 = x_33;
x_7 = x_34;
x_8 = x_3;
x_9 = x_4;
x_10 = lean_box(0);
goto block_17;
}
}
else
{
lean_object* x_35; lean_object* x_36; 
x_35 = l_Lean_Server_FileWorker_handleNotification___closed__10;
x_36 = l_Lean_Server_FileWorker_handleNotification___closed__11;
x_6 = x_35;
x_7 = x_36;
x_8 = x_3;
x_9 = x_4;
x_10 = lean_box(0);
goto block_17;
}
}
else
{
lean_object* x_37; lean_object* x_38; 
x_37 = l_Lean_Server_FileWorker_handleNotification___closed__12;
x_38 = l_Lean_Server_FileWorker_handleNotification___closed__13;
x_6 = x_37;
x_7 = x_38;
x_8 = x_3;
x_9 = x_4;
x_10 = lean_box(0);
goto block_17;
}
}
else
{
lean_object* x_39; lean_object* x_40; 
x_39 = l_Lean_Server_FileWorker_handleNotification___closed__14;
x_40 = l_Lean_Server_FileWorker_handleNotification___closed__15;
x_6 = x_39;
x_7 = x_40;
x_8 = x_3;
x_9 = x_4;
x_10 = lean_box(0);
goto block_17;
}
block_17:
{
lean_object* x_11; 
x_11 = l_Lean_Server_FileWorker_parseParams___redArg(x_6, x_2);
if (lean_obj_tag(x_11) == 0)
{
lean_object* x_12; lean_object* x_13; 
x_12 = lean_ctor_get(x_11, 0);
lean_inc(x_12);
lean_dec_ref(x_11);
x_13 = lean_apply_4(x_7, x_12, x_8, x_9, lean_box(0));
return x_13;
}
else
{
uint8_t x_14; 
lean_dec(x_9);
lean_dec_ref(x_8);
lean_dec_ref(x_7);
x_14 = !lean_is_exclusive(x_11);
if (x_14 == 0)
{
return x_11;
}
else
{
lean_object* x_15; lean_object* x_16; 
x_15 = lean_ctor_get(x_11, 0);
lean_inc(x_15);
lean_dec(x_11);
x_16 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_16, 0, x_15);
return x_16;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleNotification___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_Server_FileWorker_handleNotification(x_1, x_2, x_3, x_4);
lean_dec_ref(x_1);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_queueRequest___redArg___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0_spec__0___redArg(x_1, x_2, x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_queueRequest___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; lean_object* x_6; 
x_5 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_queueRequest___redArg___lam__0), 3, 2);
lean_closure_set(x_5, 0, x_1);
lean_closure_set(x_5, 1, x_2);
x_6 = l_Lean_Server_FileWorker_updatePendingRequests___redArg(x_5, x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_queueRequest(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_Server_FileWorker_queueRequest___redArg(x_1, x_2, x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_queueRequest___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_Server_FileWorker_queueRequest(x_1, x_2, x_3, x_4);
lean_dec(x_4);
lean_dec_ref(x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_queueRequest___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_queueRequest___redArg(x_1, x_2, x_3);
lean_dec(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_IO_ofExcept___at___00Lean_Server_FileWorker_handleImportCompletionRequest_spec__0___redArg(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
uint8_t x_3; 
x_3 = !lean_is_exclusive(x_1);
if (x_3 == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_4 = lean_ctor_get(x_1, 0);
x_5 = lean_io_error_to_string(x_4);
x_6 = lean_mk_io_user_error(x_5);
lean_ctor_set_tag(x_1, 1);
lean_ctor_set(x_1, 0, x_6);
return x_1;
}
else
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
x_7 = lean_ctor_get(x_1, 0);
lean_inc(x_7);
lean_dec(x_1);
x_8 = lean_io_error_to_string(x_7);
x_9 = lean_mk_io_user_error(x_8);
x_10 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_10, 0, x_9);
return x_10;
}
}
else
{
uint8_t x_11; 
x_11 = !lean_is_exclusive(x_1);
if (x_11 == 0)
{
lean_ctor_set_tag(x_1, 0);
return x_1;
}
else
{
lean_object* x_12; lean_object* x_13; 
x_12 = lean_ctor_get(x_1, 0);
lean_inc(x_12);
lean_dec(x_1);
x_13 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_13, 0, x_12);
return x_13;
}
}
}
}
LEAN_EXPORT lean_object* l_IO_ofExcept___at___00Lean_Server_FileWorker_handleImportCompletionRequest_spec__0(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; 
x_4 = l_IO_ofExcept___at___00Lean_Server_FileWorker_handleImportCompletionRequest_spec__0___redArg(x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleImportCompletionRequest___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_8; 
x_8 = l_ImportCompletion_collectAvailableImports();
if (lean_obj_tag(x_8) == 0)
{
uint8_t x_9; 
x_9 = !lean_is_exclusive(x_8);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11; uint8_t x_12; 
x_10 = lean_ctor_get(x_8, 0);
x_11 = lean_io_mono_ms_now();
x_12 = !lean_is_exclusive(x_1);
if (x_12 == 0)
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; 
x_13 = lean_ctor_get(x_1, 1);
x_14 = lean_ctor_get(x_1, 0);
lean_dec(x_14);
x_15 = lean_ctor_get(x_2, 3);
lean_inc(x_15);
lean_dec_ref(x_2);
x_16 = lean_ctor_get(x_3, 0);
lean_inc_ref(x_16);
lean_dec_ref(x_3);
x_17 = l_ImportCompletion_find(x_4, x_13, x_5, x_15, x_10);
x_18 = l_Lean_Lsp_instToJsonCompletionList_toJson(x_17);
lean_ctor_set_tag(x_1, 2);
lean_ctor_set(x_1, 1, x_18);
lean_ctor_set(x_1, 0, x_6);
x_19 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_1);
x_20 = l_Std_Channel_Sync_send___redArg(x_16, x_19);
x_21 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_21, 0, x_10);
lean_ctor_set(x_21, 1, x_11);
lean_ctor_set(x_8, 0, x_21);
return x_8;
}
else
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; 
x_22 = lean_ctor_get(x_1, 1);
lean_inc(x_22);
lean_dec(x_1);
x_23 = lean_ctor_get(x_2, 3);
lean_inc(x_23);
lean_dec_ref(x_2);
x_24 = lean_ctor_get(x_3, 0);
lean_inc_ref(x_24);
lean_dec_ref(x_3);
x_25 = l_ImportCompletion_find(x_4, x_22, x_5, x_23, x_10);
x_26 = l_Lean_Lsp_instToJsonCompletionList_toJson(x_25);
x_27 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_27, 0, x_6);
lean_ctor_set(x_27, 1, x_26);
x_28 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_27);
x_29 = l_Std_Channel_Sync_send___redArg(x_24, x_28);
x_30 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_30, 0, x_10);
lean_ctor_set(x_30, 1, x_11);
lean_ctor_set(x_8, 0, x_30);
return x_8;
}
}
else
{
lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; 
x_31 = lean_ctor_get(x_8, 0);
lean_inc(x_31);
lean_dec(x_8);
x_32 = lean_io_mono_ms_now();
x_33 = lean_ctor_get(x_1, 1);
lean_inc_ref(x_33);
if (lean_is_exclusive(x_1)) {
 lean_ctor_release(x_1, 0);
 lean_ctor_release(x_1, 1);
 x_34 = x_1;
} else {
 lean_dec_ref(x_1);
 x_34 = lean_box(0);
}
x_35 = lean_ctor_get(x_2, 3);
lean_inc(x_35);
lean_dec_ref(x_2);
x_36 = lean_ctor_get(x_3, 0);
lean_inc_ref(x_36);
lean_dec_ref(x_3);
x_37 = l_ImportCompletion_find(x_4, x_33, x_5, x_35, x_31);
x_38 = l_Lean_Lsp_instToJsonCompletionList_toJson(x_37);
if (lean_is_scalar(x_34)) {
 x_39 = lean_alloc_ctor(2, 2, 0);
} else {
 x_39 = x_34;
 lean_ctor_set_tag(x_39, 2);
}
lean_ctor_set(x_39, 0, x_6);
lean_ctor_set(x_39, 1, x_38);
x_40 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_39);
x_41 = l_Std_Channel_Sync_send___redArg(x_36, x_40);
x_42 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_42, 0, x_31);
lean_ctor_set(x_42, 1, x_32);
x_43 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_43, 0, x_42);
return x_43;
}
}
else
{
uint8_t x_44; 
lean_dec(x_6);
lean_dec(x_4);
lean_dec_ref(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_44 = !lean_is_exclusive(x_8);
if (x_44 == 0)
{
return x_8;
}
else
{
lean_object* x_45; lean_object* x_46; 
x_45 = lean_ctor_get(x_8, 0);
lean_inc(x_45);
lean_dec(x_8);
x_46 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_46, 0, x_45);
return x_46;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleImportCompletionRequest___lam__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_9; 
x_9 = l_IO_ofExcept___at___00Lean_Server_FileWorker_handleImportCompletionRequest_spec__0___redArg(x_7);
if (lean_obj_tag(x_9) == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_40; lean_object* x_41; uint8_t x_42; 
x_10 = lean_ctor_get(x_9, 0);
lean_inc(x_10);
if (lean_is_exclusive(x_9)) {
 lean_ctor_release(x_9, 0);
 x_11 = x_9;
} else {
 lean_dec_ref(x_9);
 x_11 = lean_box(0);
}
x_12 = lean_ctor_get(x_10, 0);
lean_inc_ref(x_12);
x_13 = lean_ctor_get(x_10, 1);
lean_inc(x_13);
if (lean_is_exclusive(x_10)) {
 lean_ctor_release(x_10, 0);
 lean_ctor_release(x_10, 1);
 x_14 = x_10;
} else {
 lean_dec_ref(x_10);
 x_14 = lean_box(0);
}
x_15 = lean_io_mono_ms_now();
x_40 = lean_unsigned_to_nat(10000u);
x_41 = lean_nat_sub(x_15, x_13);
lean_dec(x_13);
x_42 = lean_nat_dec_le(x_40, x_41);
lean_dec(x_41);
if (x_42 == 0)
{
x_16 = x_12;
x_17 = lean_box(0);
goto block_39;
}
else
{
lean_object* x_43; 
lean_dec_ref(x_12);
x_43 = l_ImportCompletion_collectAvailableImports();
if (lean_obj_tag(x_43) == 0)
{
lean_object* x_44; 
x_44 = lean_ctor_get(x_43, 0);
lean_inc(x_44);
lean_dec_ref(x_43);
x_16 = x_44;
x_17 = lean_box(0);
goto block_39;
}
else
{
uint8_t x_45; 
lean_dec(x_15);
lean_dec(x_14);
lean_dec(x_11);
lean_dec(x_6);
lean_dec(x_4);
lean_dec_ref(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_45 = !lean_is_exclusive(x_43);
if (x_45 == 0)
{
return x_43;
}
else
{
lean_object* x_46; lean_object* x_47; 
x_46 = lean_ctor_get(x_43, 0);
lean_inc(x_46);
lean_dec(x_43);
x_47 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_47, 0, x_46);
return x_47;
}
}
}
block_39:
{
uint8_t x_18; 
x_18 = !lean_is_exclusive(x_1);
if (x_18 == 0)
{
lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; 
x_19 = lean_ctor_get(x_1, 1);
x_20 = lean_ctor_get(x_1, 0);
lean_dec(x_20);
x_21 = lean_ctor_get(x_2, 3);
lean_inc(x_21);
lean_dec_ref(x_2);
x_22 = lean_ctor_get(x_3, 0);
lean_inc_ref(x_22);
lean_dec_ref(x_3);
x_23 = l_ImportCompletion_find(x_4, x_19, x_5, x_21, x_16);
x_24 = l_Lean_Lsp_instToJsonCompletionList_toJson(x_23);
lean_ctor_set_tag(x_1, 2);
lean_ctor_set(x_1, 1, x_24);
lean_ctor_set(x_1, 0, x_6);
x_25 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_1);
x_26 = l_Std_Channel_Sync_send___redArg(x_22, x_25);
if (lean_is_scalar(x_14)) {
 x_27 = lean_alloc_ctor(0, 2, 0);
} else {
 x_27 = x_14;
}
lean_ctor_set(x_27, 0, x_16);
lean_ctor_set(x_27, 1, x_15);
if (lean_is_scalar(x_11)) {
 x_28 = lean_alloc_ctor(0, 1, 0);
} else {
 x_28 = x_11;
}
lean_ctor_set(x_28, 0, x_27);
return x_28;
}
else
{
lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; 
x_29 = lean_ctor_get(x_1, 1);
lean_inc(x_29);
lean_dec(x_1);
x_30 = lean_ctor_get(x_2, 3);
lean_inc(x_30);
lean_dec_ref(x_2);
x_31 = lean_ctor_get(x_3, 0);
lean_inc_ref(x_31);
lean_dec_ref(x_3);
x_32 = l_ImportCompletion_find(x_4, x_29, x_5, x_30, x_16);
x_33 = l_Lean_Lsp_instToJsonCompletionList_toJson(x_32);
x_34 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_34, 0, x_6);
lean_ctor_set(x_34, 1, x_33);
x_35 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_34);
x_36 = l_Std_Channel_Sync_send___redArg(x_31, x_35);
if (lean_is_scalar(x_14)) {
 x_37 = lean_alloc_ctor(0, 2, 0);
} else {
 x_37 = x_14;
}
lean_ctor_set(x_37, 0, x_16);
lean_ctor_set(x_37, 1, x_15);
if (lean_is_scalar(x_11)) {
 x_38 = lean_alloc_ctor(0, 1, 0);
} else {
 x_38 = x_11;
}
lean_ctor_set(x_38, 0, x_37);
return x_38;
}
}
}
else
{
lean_dec(x_6);
lean_dec(x_4);
lean_dec_ref(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
return x_9;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleImportCompletionRequest___lam__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l_Lean_Server_FileWorker_handleImportCompletionRequest___lam__0(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec_ref(x_5);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleImportCompletionRequest___lam__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
lean_object* x_9; 
x_9 = l_Lean_Server_FileWorker_handleImportCompletionRequest___lam__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
lean_dec_ref(x_5);
return x_9;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleImportCompletionRequest(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
x_6 = lean_st_ref_get(x_4);
x_7 = lean_ctor_get(x_6, 0);
lean_inc_ref(x_7);
x_8 = lean_ctor_get(x_7, 0);
lean_inc_ref(x_8);
lean_dec_ref(x_7);
x_9 = lean_ctor_get(x_8, 0);
lean_inc_ref(x_9);
x_10 = lean_ctor_get(x_6, 2);
lean_inc(x_10);
lean_dec(x_6);
if (lean_obj_tag(x_10) == 0)
{
lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; 
x_11 = lean_ctor_get(x_8, 1);
lean_inc_ref(x_11);
lean_dec_ref(x_8);
x_12 = lean_ctor_get(x_9, 1);
lean_inc(x_12);
x_13 = lean_ctor_get(x_9, 3);
lean_inc_ref(x_13);
lean_dec_ref(x_9);
x_14 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleImportCompletionRequest___lam__0___boxed), 7, 6);
lean_closure_set(x_14, 0, x_2);
lean_closure_set(x_14, 1, x_11);
lean_closure_set(x_14, 2, x_3);
lean_closure_set(x_14, 3, x_12);
lean_closure_set(x_14, 4, x_13);
lean_closure_set(x_14, 5, x_1);
x_15 = l_Lean_Server_ServerTask_IO_asTask___redArg(x_14);
x_16 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_16, 0, x_15);
return x_16;
}
else
{
lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; 
x_17 = lean_ctor_get(x_8, 1);
lean_inc_ref(x_17);
lean_dec_ref(x_8);
x_18 = lean_ctor_get(x_9, 1);
lean_inc(x_18);
x_19 = lean_ctor_get(x_9, 3);
lean_inc_ref(x_19);
lean_dec_ref(x_9);
x_20 = !lean_is_exclusive(x_10);
if (x_20 == 0)
{
lean_object* x_21; lean_object* x_22; lean_object* x_23; 
x_21 = lean_ctor_get(x_10, 0);
x_22 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleImportCompletionRequest___lam__1___boxed), 8, 6);
lean_closure_set(x_22, 0, x_2);
lean_closure_set(x_22, 1, x_17);
lean_closure_set(x_22, 2, x_3);
lean_closure_set(x_22, 3, x_18);
lean_closure_set(x_22, 4, x_19);
lean_closure_set(x_22, 5, x_1);
x_23 = l_Lean_Server_ServerTask_IO_mapTaskCostly___redArg(x_22, x_21);
lean_ctor_set_tag(x_10, 0);
lean_ctor_set(x_10, 0, x_23);
return x_10;
}
else
{
lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; 
x_24 = lean_ctor_get(x_10, 0);
lean_inc(x_24);
lean_dec(x_10);
x_25 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleImportCompletionRequest___lam__1___boxed), 8, 6);
lean_closure_set(x_25, 0, x_2);
lean_closure_set(x_25, 1, x_17);
lean_closure_set(x_25, 2, x_3);
lean_closure_set(x_25, 3, x_18);
lean_closure_set(x_25, 4, x_19);
lean_closure_set(x_25, 5, x_1);
x_26 = l_Lean_Server_ServerTask_IO_mapTaskCostly___redArg(x_25, x_24);
x_27 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_27, 0, x_26);
return x_27;
}
}
}
}
LEAN_EXPORT lean_object* l_IO_ofExcept___at___00Lean_Server_FileWorker_handleImportCompletionRequest_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_IO_ofExcept___at___00Lean_Server_FileWorker_handleImportCompletionRequest_spec__0(x_1, x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_IO_ofExcept___at___00Lean_Server_FileWorker_handleImportCompletionRequest_spec__0___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_IO_ofExcept___at___00Lean_Server_FileWorker_handleImportCompletionRequest_spec__0___redArg(x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleImportCompletionRequest___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_Server_FileWorker_handleImportCompletionRequest(x_1, x_2, x_3, x_4);
lean_dec(x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__0___redArg(lean_object* x_1) {
_start:
{
lean_object* x_3; 
lean_inc(x_1);
x_3 = l_Lean_Lsp_instFromJsonCompletionParams_fromJson(x_1);
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; 
x_4 = lean_ctor_get(x_3, 0);
lean_inc(x_4);
lean_dec_ref(x_3);
x_5 = l_Lean_Server_FileWorker_parseParams___redArg___closed__0;
x_6 = l_Lean_Json_compress(x_1);
x_7 = lean_string_append(x_5, x_6);
lean_dec_ref(x_6);
x_8 = l_Lean_Server_FileWorker_parseParams___redArg___closed__1;
x_9 = lean_string_append(x_7, x_8);
x_10 = lean_string_append(x_9, x_4);
lean_dec(x_4);
x_11 = l_IO_throwServerError___redArg(x_10);
return x_11;
}
else
{
uint8_t x_12; 
lean_dec(x_1);
x_12 = !lean_is_exclusive(x_3);
if (x_12 == 0)
{
lean_ctor_set_tag(x_3, 0);
return x_3;
}
else
{
lean_object* x_13; lean_object* x_14; 
x_13 = lean_ctor_get(x_3, 0);
lean_inc(x_13);
lean_dec(x_3);
x_14 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_14, 0, x_13);
return x_14;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__0___redArg(x_1);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__1___redArg(lean_object* x_1) {
_start:
{
lean_object* x_3; 
lean_inc(x_1);
x_3 = l_Lean_Lsp_instFromJsonRpcConnectParams_fromJson(x_1);
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; 
x_4 = lean_ctor_get(x_3, 0);
lean_inc(x_4);
lean_dec_ref(x_3);
x_5 = l_Lean_Server_FileWorker_parseParams___redArg___closed__0;
x_6 = l_Lean_Json_compress(x_1);
x_7 = lean_string_append(x_5, x_6);
lean_dec_ref(x_6);
x_8 = l_Lean_Server_FileWorker_parseParams___redArg___closed__1;
x_9 = lean_string_append(x_7, x_8);
x_10 = lean_string_append(x_9, x_4);
lean_dec(x_4);
x_11 = l_IO_throwServerError___redArg(x_10);
return x_11;
}
else
{
uint8_t x_12; 
lean_dec(x_1);
x_12 = !lean_is_exclusive(x_3);
if (x_12 == 0)
{
lean_ctor_set_tag(x_3, 0);
return x_3;
}
else
{
lean_object* x_13; lean_object* x_14; 
x_13 = lean_ctor_get(x_3, 0);
lean_inc(x_13);
lean_dec(x_3);
x_14 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_14, 0, x_13);
return x_14;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__1___redArg(x_1);
return x_5;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("$/lean/rpc/connect", 18, 18);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("textDocument/completion", 23, 23);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_7; lean_object* x_8; lean_object* x_20; lean_object* x_21; uint8_t x_22; 
x_20 = lean_st_ref_get(x_5);
x_21 = l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases___closed__0;
x_22 = lean_string_dec_eq(x_2, x_21);
if (x_22 == 0)
{
lean_object* x_23; uint8_t x_24; 
x_23 = l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases___closed__1;
x_24 = lean_string_dec_eq(x_2, x_23);
if (x_24 == 0)
{
lean_object* x_25; lean_object* x_26; 
lean_dec(x_20);
lean_dec_ref(x_4);
lean_dec(x_3);
lean_dec(x_1);
x_25 = lean_box(x_24);
x_26 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_26, 0, x_25);
return x_26;
}
else
{
lean_object* x_27; 
x_27 = l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__0___redArg(x_3);
if (lean_obj_tag(x_27) == 0)
{
lean_object* x_28; uint8_t x_29; 
x_28 = lean_ctor_get(x_20, 0);
lean_inc_ref(x_28);
x_29 = !lean_is_exclusive(x_27);
if (x_29 == 0)
{
uint8_t x_30; 
x_30 = !lean_is_exclusive(x_20);
if (x_30 == 0)
{
lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; 
x_31 = lean_ctor_get(x_28, 0);
x_32 = lean_ctor_get(x_31, 0);
x_33 = lean_ctor_get(x_31, 1);
x_34 = lean_ctor_get(x_27, 0);
x_35 = lean_ctor_get(x_20, 1);
x_36 = lean_ctor_get(x_20, 3);
x_37 = lean_ctor_get(x_20, 4);
x_38 = lean_ctor_get(x_20, 2);
lean_dec(x_38);
x_39 = lean_ctor_get(x_20, 0);
lean_dec(x_39);
x_40 = lean_ctor_get(x_32, 3);
x_41 = lean_ctor_get(x_33, 3);
lean_inc(x_34);
x_42 = l_ImportCompletion_isImportCompletionRequest(x_40, x_41, x_34);
if (x_42 == 0)
{
lean_object* x_43; 
lean_free_object(x_20);
lean_dec(x_37);
lean_dec(x_36);
lean_dec(x_35);
lean_dec(x_34);
lean_dec_ref(x_28);
lean_dec_ref(x_4);
lean_dec(x_1);
x_43 = lean_box(x_42);
lean_ctor_set(x_27, 0, x_43);
return x_27;
}
else
{
lean_object* x_44; uint8_t x_45; 
lean_free_object(x_27);
x_44 = l_Lean_Server_FileWorker_handleImportCompletionRequest(x_1, x_34, x_4, x_5);
x_45 = !lean_is_exclusive(x_44);
if (x_45 == 0)
{
lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; 
x_46 = lean_ctor_get(x_44, 0);
x_47 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_47, 0, x_46);
lean_ctor_set(x_20, 2, x_47);
x_48 = lean_st_ref_set(x_5, x_20);
x_49 = lean_box(x_42);
lean_ctor_set(x_44, 0, x_49);
return x_44;
}
else
{
lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; 
x_50 = lean_ctor_get(x_44, 0);
lean_inc(x_50);
lean_dec(x_44);
x_51 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_51, 0, x_50);
lean_ctor_set(x_20, 2, x_51);
x_52 = lean_st_ref_set(x_5, x_20);
x_53 = lean_box(x_42);
x_54 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_54, 0, x_53);
return x_54;
}
}
}
else
{
lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; uint8_t x_64; 
x_55 = lean_ctor_get(x_28, 0);
x_56 = lean_ctor_get(x_55, 0);
x_57 = lean_ctor_get(x_55, 1);
x_58 = lean_ctor_get(x_27, 0);
x_59 = lean_ctor_get(x_20, 1);
x_60 = lean_ctor_get(x_20, 3);
x_61 = lean_ctor_get(x_20, 4);
lean_inc(x_61);
lean_inc(x_60);
lean_inc(x_59);
lean_dec(x_20);
x_62 = lean_ctor_get(x_56, 3);
x_63 = lean_ctor_get(x_57, 3);
lean_inc(x_58);
x_64 = l_ImportCompletion_isImportCompletionRequest(x_62, x_63, x_58);
if (x_64 == 0)
{
lean_object* x_65; 
lean_dec(x_61);
lean_dec(x_60);
lean_dec(x_59);
lean_dec(x_58);
lean_dec_ref(x_28);
lean_dec_ref(x_4);
lean_dec(x_1);
x_65 = lean_box(x_64);
lean_ctor_set(x_27, 0, x_65);
return x_27;
}
else
{
lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; 
lean_free_object(x_27);
x_66 = l_Lean_Server_FileWorker_handleImportCompletionRequest(x_1, x_58, x_4, x_5);
x_67 = lean_ctor_get(x_66, 0);
lean_inc(x_67);
if (lean_is_exclusive(x_66)) {
 lean_ctor_release(x_66, 0);
 x_68 = x_66;
} else {
 lean_dec_ref(x_66);
 x_68 = lean_box(0);
}
x_69 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_69, 0, x_67);
x_70 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_70, 0, x_28);
lean_ctor_set(x_70, 1, x_59);
lean_ctor_set(x_70, 2, x_69);
lean_ctor_set(x_70, 3, x_60);
lean_ctor_set(x_70, 4, x_61);
x_71 = lean_st_ref_set(x_5, x_70);
x_72 = lean_box(x_64);
if (lean_is_scalar(x_68)) {
 x_73 = lean_alloc_ctor(0, 1, 0);
} else {
 x_73 = x_68;
}
lean_ctor_set(x_73, 0, x_72);
return x_73;
}
}
}
else
{
lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; uint8_t x_84; 
x_74 = lean_ctor_get(x_28, 0);
x_75 = lean_ctor_get(x_74, 0);
x_76 = lean_ctor_get(x_74, 1);
x_77 = lean_ctor_get(x_27, 0);
lean_inc(x_77);
lean_dec(x_27);
x_78 = lean_ctor_get(x_20, 1);
lean_inc(x_78);
x_79 = lean_ctor_get(x_20, 3);
lean_inc(x_79);
x_80 = lean_ctor_get(x_20, 4);
lean_inc(x_80);
if (lean_is_exclusive(x_20)) {
 lean_ctor_release(x_20, 0);
 lean_ctor_release(x_20, 1);
 lean_ctor_release(x_20, 2);
 lean_ctor_release(x_20, 3);
 lean_ctor_release(x_20, 4);
 x_81 = x_20;
} else {
 lean_dec_ref(x_20);
 x_81 = lean_box(0);
}
x_82 = lean_ctor_get(x_75, 3);
x_83 = lean_ctor_get(x_76, 3);
lean_inc(x_77);
x_84 = l_ImportCompletion_isImportCompletionRequest(x_82, x_83, x_77);
if (x_84 == 0)
{
lean_object* x_85; lean_object* x_86; 
lean_dec(x_81);
lean_dec(x_80);
lean_dec(x_79);
lean_dec(x_78);
lean_dec(x_77);
lean_dec_ref(x_28);
lean_dec_ref(x_4);
lean_dec(x_1);
x_85 = lean_box(x_84);
x_86 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_86, 0, x_85);
return x_86;
}
else
{
lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; 
x_87 = l_Lean_Server_FileWorker_handleImportCompletionRequest(x_1, x_77, x_4, x_5);
x_88 = lean_ctor_get(x_87, 0);
lean_inc(x_88);
if (lean_is_exclusive(x_87)) {
 lean_ctor_release(x_87, 0);
 x_89 = x_87;
} else {
 lean_dec_ref(x_87);
 x_89 = lean_box(0);
}
x_90 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_90, 0, x_88);
if (lean_is_scalar(x_81)) {
 x_91 = lean_alloc_ctor(0, 5, 0);
} else {
 x_91 = x_81;
}
lean_ctor_set(x_91, 0, x_28);
lean_ctor_set(x_91, 1, x_78);
lean_ctor_set(x_91, 2, x_90);
lean_ctor_set(x_91, 3, x_79);
lean_ctor_set(x_91, 4, x_80);
x_92 = lean_st_ref_set(x_5, x_91);
x_93 = lean_box(x_84);
if (lean_is_scalar(x_89)) {
 x_94 = lean_alloc_ctor(0, 1, 0);
} else {
 x_94 = x_89;
}
lean_ctor_set(x_94, 0, x_93);
return x_94;
}
}
}
else
{
lean_object* x_95; 
lean_dec(x_20);
x_95 = lean_ctor_get(x_27, 0);
lean_inc(x_95);
lean_dec_ref(x_27);
x_7 = x_95;
x_8 = lean_box(0);
goto block_19;
}
}
}
else
{
lean_object* x_96; 
lean_dec(x_20);
x_96 = l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__1___redArg(x_3);
if (lean_obj_tag(x_96) == 0)
{
lean_object* x_97; 
lean_dec_ref(x_96);
x_97 = l_Lean_Server_FileWorker_handleRpcConnect___redArg(x_5);
if (lean_obj_tag(x_97) == 0)
{
uint8_t x_98; 
x_98 = !lean_is_exclusive(x_97);
if (x_98 == 0)
{
lean_object* x_99; lean_object* x_100; uint64_t x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; 
x_99 = lean_ctor_get(x_97, 0);
x_100 = lean_ctor_get(x_4, 0);
lean_inc_ref(x_100);
lean_dec_ref(x_4);
x_101 = lean_unbox_uint64(x_99);
lean_dec(x_99);
x_102 = l_Lean_Lsp_instToJsonRpcConnected_toJson(x_101);
x_103 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_103, 0, x_1);
lean_ctor_set(x_103, 1, x_102);
x_104 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_103);
x_105 = l_Std_Channel_Sync_send___redArg(x_100, x_104);
x_106 = lean_box(x_22);
lean_ctor_set(x_97, 0, x_106);
return x_97;
}
else
{
lean_object* x_107; lean_object* x_108; uint64_t x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; 
x_107 = lean_ctor_get(x_97, 0);
lean_inc(x_107);
lean_dec(x_97);
x_108 = lean_ctor_get(x_4, 0);
lean_inc_ref(x_108);
lean_dec_ref(x_4);
x_109 = lean_unbox_uint64(x_107);
lean_dec(x_107);
x_110 = l_Lean_Lsp_instToJsonRpcConnected_toJson(x_109);
x_111 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_111, 0, x_1);
lean_ctor_set(x_111, 1, x_110);
x_112 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_111);
x_113 = l_Std_Channel_Sync_send___redArg(x_108, x_112);
x_114 = lean_box(x_22);
x_115 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_115, 0, x_114);
return x_115;
}
}
else
{
lean_object* x_116; 
x_116 = lean_ctor_get(x_97, 0);
lean_inc(x_116);
lean_dec_ref(x_97);
x_7 = x_116;
x_8 = lean_box(0);
goto block_19;
}
}
else
{
lean_object* x_117; 
x_117 = lean_ctor_get(x_96, 0);
lean_inc(x_117);
lean_dec_ref(x_96);
x_7 = x_117;
x_8 = lean_box(0);
goto block_19;
}
}
block_19:
{
lean_object* x_9; uint8_t x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_object* x_17; lean_object* x_18; 
x_9 = lean_ctor_get(x_4, 0);
lean_inc_ref(x_9);
lean_dec_ref(x_4);
x_10 = 4;
x_11 = lean_io_error_to_string(x_7);
x_12 = lean_box(0);
x_13 = lean_alloc_ctor(3, 3, 1);
lean_ctor_set(x_13, 0, x_1);
lean_ctor_set(x_13, 1, x_11);
lean_ctor_set(x_13, 2, x_12);
lean_ctor_set_uint8(x_13, sizeof(void*)*3, x_10);
x_14 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_13);
x_15 = l_Std_Channel_Sync_send___redArg(x_9, x_14);
x_16 = 1;
x_17 = lean_box(x_16);
x_18 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_18, 0, x_17);
return x_18;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__0(x_1, x_2, x_3);
lean_dec(x_3);
lean_dec_ref(x_2);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__1(x_1, x_2, x_3);
lean_dec(x_3);
lean_dec_ref(x_2);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__0___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__0___redArg(x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__1___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Server_FileWorker_parseParams___at___00Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases_spec__1___redArg(x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases(x_1, x_2, x_3, x_4, x_5);
lean_dec(x_5);
lean_dec_ref(x_2);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_readDoc___at___00Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest_spec__0(lean_object* x_1) {
_start:
{
lean_object* x_3; lean_object* x_4; 
x_3 = lean_ctor_get(x_1, 1);
lean_inc_ref(x_3);
x_4 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_4, 0, x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest_spec__1(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; uint8_t x_11; 
x_11 = lean_usize_dec_eq(x_3, x_4);
if (x_11 == 0)
{
lean_object* x_12; uint8_t x_15; uint8_t x_17; uint8_t x_18; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_35; lean_object* x_36; lean_object* x_37; uint8_t x_38; 
x_12 = lean_array_uget(x_2, x_3);
x_20 = l_Lean_Lsp_DiagnosticWith_fullRange___redArg(x_12);
x_21 = lean_ctor_get(x_20, 0);
lean_inc_ref(x_21);
x_22 = lean_ctor_get(x_20, 1);
lean_inc_ref(x_22);
lean_dec_ref(x_20);
x_23 = lean_ctor_get(x_21, 0);
lean_inc(x_23);
lean_dec_ref(x_21);
x_35 = lean_ctor_get(x_22, 0);
lean_inc(x_35);
x_36 = lean_ctor_get(x_22, 1);
lean_inc(x_36);
lean_dec_ref(x_22);
x_37 = lean_unsigned_to_nat(0u);
x_38 = lean_nat_dec_eq(x_36, x_37);
lean_dec(x_36);
if (x_38 == 0)
{
lean_object* x_39; lean_object* x_40; 
x_39 = lean_unsigned_to_nat(1u);
x_40 = lean_nat_add(x_35, x_39);
lean_dec(x_35);
x_24 = x_40;
goto block_34;
}
else
{
x_24 = x_35;
goto block_34;
}
block_14:
{
lean_object* x_13; 
x_13 = lean_array_push(x_5, x_12);
x_6 = x_13;
goto block_10;
}
block_16:
{
if (x_15 == 0)
{
lean_dec(x_12);
x_6 = x_5;
goto block_10;
}
else
{
goto block_14;
}
}
block_19:
{
if (x_17 == 0)
{
x_15 = x_11;
goto block_16;
}
else
{
if (x_18 == 0)
{
x_15 = x_11;
goto block_16;
}
else
{
goto block_14;
}
}
}
block_34:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_25; 
lean_dec(x_24);
lean_dec(x_23);
x_25 = lean_array_push(x_5, x_12);
x_6 = x_25;
goto block_10;
}
else
{
lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29; uint8_t x_30; uint8_t x_31; 
x_26 = lean_ctor_get(x_1, 0);
x_27 = lean_ctor_get(x_26, 0);
x_28 = lean_ctor_get(x_26, 1);
x_29 = lean_nat_dec_lt(x_27, x_24);
lean_dec(x_24);
x_30 = lean_nat_dec_le(x_23, x_27);
x_31 = lean_nat_dec_le(x_27, x_23);
if (x_31 == 0)
{
lean_dec(x_23);
x_17 = x_30;
x_18 = x_29;
goto block_19;
}
else
{
uint8_t x_32; 
x_32 = lean_nat_dec_lt(x_23, x_28);
lean_dec(x_23);
if (x_32 == 0)
{
x_17 = x_30;
x_18 = x_29;
goto block_19;
}
else
{
lean_object* x_33; 
x_33 = lean_array_push(x_5, x_12);
x_6 = x_33;
goto block_10;
}
}
}
}
}
else
{
return x_5;
}
block_10:
{
size_t x_7; size_t x_8; 
x_7 = 1;
x_8 = lean_usize_add(x_3, x_7);
x_3 = x_8;
x_5 = x_6;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; uint8_t x_6; 
x_5 = l_Lean_Server_RequestM_readDoc___at___00Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest_spec__0(x_3);
x_6 = !lean_is_exclusive(x_5);
if (x_6 == 0)
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; 
x_7 = lean_ctor_get(x_5, 0);
x_8 = lean_ctor_get(x_1, 3);
x_9 = lean_st_ref_get(x_8);
x_10 = lean_ctor_get(x_7, 0);
lean_inc_ref(x_10);
lean_dec(x_7);
x_11 = lean_ctor_get(x_10, 3);
lean_inc(x_11);
lean_dec_ref(x_10);
x_12 = lean_st_ref_get(x_11);
lean_dec(x_11);
x_13 = l_Array_append___redArg(x_9, x_12);
lean_dec(x_12);
x_14 = lean_unsigned_to_nat(0u);
x_15 = lean_array_get_size(x_13);
x_16 = l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__2;
x_17 = lean_nat_dec_lt(x_14, x_15);
if (x_17 == 0)
{
lean_dec(x_15);
lean_dec_ref(x_13);
lean_ctor_set(x_5, 0, x_16);
return x_5;
}
else
{
uint8_t x_18; 
x_18 = lean_nat_dec_le(x_15, x_15);
if (x_18 == 0)
{
lean_dec(x_15);
lean_dec_ref(x_13);
lean_ctor_set(x_5, 0, x_16);
return x_5;
}
else
{
size_t x_19; size_t x_20; lean_object* x_21; 
x_19 = 0;
x_20 = lean_usize_of_nat(x_15);
lean_dec(x_15);
x_21 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest_spec__1(x_2, x_13, x_19, x_20, x_16);
lean_dec_ref(x_13);
lean_ctor_set(x_5, 0, x_21);
return x_5;
}
}
}
else
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; 
x_22 = lean_ctor_get(x_5, 0);
lean_inc(x_22);
lean_dec(x_5);
x_23 = lean_ctor_get(x_1, 3);
x_24 = lean_st_ref_get(x_23);
x_25 = lean_ctor_get(x_22, 0);
lean_inc_ref(x_25);
lean_dec(x_22);
x_26 = lean_ctor_get(x_25, 3);
lean_inc(x_26);
lean_dec_ref(x_25);
x_27 = lean_st_ref_get(x_26);
lean_dec(x_26);
x_28 = l_Array_append___redArg(x_24, x_27);
lean_dec(x_27);
x_29 = lean_unsigned_to_nat(0u);
x_30 = lean_array_get_size(x_28);
x_31 = l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__2;
x_32 = lean_nat_dec_lt(x_29, x_30);
if (x_32 == 0)
{
lean_object* x_33; 
lean_dec(x_30);
lean_dec_ref(x_28);
x_33 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_33, 0, x_31);
return x_33;
}
else
{
uint8_t x_34; 
x_34 = lean_nat_dec_le(x_30, x_30);
if (x_34 == 0)
{
lean_object* x_35; 
lean_dec(x_30);
lean_dec_ref(x_28);
x_35 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_35, 0, x_31);
return x_35;
}
else
{
size_t x_36; size_t x_37; lean_object* x_38; lean_object* x_39; 
x_36 = 0;
x_37 = lean_usize_of_nat(x_30);
lean_dec(x_30);
x_38 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest_spec__1(x_2, x_28, x_36, x_37, x_31);
lean_dec_ref(x_28);
x_39 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_39, 0, x_38);
return x_39;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_readDoc___at___00Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest_spec__0___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Server_RequestM_readDoc___at___00Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest_spec__0(x_1);
lean_dec_ref(x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest(x_1, x_2, x_3);
lean_dec_ref(x_3);
lean_dec(x_2);
lean_dec_ref(x_1);
return x_5;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest_spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
size_t x_6; size_t x_7; lean_object* x_8; 
x_6 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_7 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_8 = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest_spec__1(x_1, x_2, x_6, x_7, x_5);
lean_dec_ref(x_2);
lean_dec(x_1);
return x_8;
}
}
static lean_object* _init_l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0_spec__0___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Cannot parse request params: ", 29, 29);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0_spec__0(lean_object* x_1) {
_start:
{
lean_object* x_2; 
lean_inc(x_1);
x_2 = l_Lean_Lsp_instFromJsonCodeAction_fromJson(x_1);
if (lean_obj_tag(x_2) == 0)
{
uint8_t x_3; 
x_3 = !lean_is_exclusive(x_2);
if (x_3 == 0)
{
lean_object* x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_4 = lean_ctor_get(x_2, 0);
x_5 = 3;
x_6 = l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0_spec__0___closed__0;
x_7 = l_Lean_Json_compress(x_1);
x_8 = lean_string_append(x_6, x_7);
lean_dec_ref(x_7);
x_9 = l_Lean_Server_FileWorker_parseParams___redArg___closed__1;
x_10 = lean_string_append(x_8, x_9);
x_11 = lean_string_append(x_10, x_4);
lean_dec(x_4);
x_12 = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(x_12, 0, x_11);
lean_ctor_set_uint8(x_12, sizeof(void*)*1, x_5);
lean_ctor_set(x_2, 0, x_12);
return x_2;
}
else
{
lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; 
x_13 = lean_ctor_get(x_2, 0);
lean_inc(x_13);
lean_dec(x_2);
x_14 = 3;
x_15 = l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0_spec__0___closed__0;
x_16 = l_Lean_Json_compress(x_1);
x_17 = lean_string_append(x_15, x_16);
lean_dec_ref(x_16);
x_18 = l_Lean_Server_FileWorker_parseParams___redArg___closed__1;
x_19 = lean_string_append(x_17, x_18);
x_20 = lean_string_append(x_19, x_13);
lean_dec(x_13);
x_21 = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(x_21, 0, x_20);
lean_ctor_set_uint8(x_21, sizeof(void*)*1, x_14);
x_22 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_22, 0, x_21);
return x_22;
}
}
else
{
uint8_t x_23; 
lean_dec(x_1);
x_23 = !lean_is_exclusive(x_2);
if (x_23 == 0)
{
return x_2;
}
else
{
lean_object* x_24; lean_object* x_25; 
x_24 = lean_ctor_get(x_2, 0);
lean_inc(x_24);
lean_dec(x_2);
x_25 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_25, 0, x_24);
return x_25;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0___redArg(lean_object* x_1) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0_spec__0(x_1);
if (lean_obj_tag(x_3) == 0)
{
uint8_t x_4; 
x_4 = !lean_is_exclusive(x_3);
if (x_4 == 0)
{
lean_ctor_set_tag(x_3, 1);
return x_3;
}
else
{
lean_object* x_5; lean_object* x_6; 
x_5 = lean_ctor_get(x_3, 0);
lean_inc(x_5);
lean_dec(x_3);
x_6 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_6, 0, x_5);
return x_6;
}
}
else
{
uint8_t x_7; 
x_7 = !lean_is_exclusive(x_3);
if (x_7 == 0)
{
lean_ctor_set_tag(x_3, 0);
return x_3;
}
else
{
lean_object* x_8; lean_object* x_9; 
x_8 = lean_ctor_get(x_3, 0);
lean_inc(x_8);
lean_dec(x_3);
x_9 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_9, 0, x_8);
return x_9;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0___redArg(x_1);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2_spec__2(lean_object* x_1) {
_start:
{
lean_object* x_2; 
lean_inc(x_1);
x_2 = l_Lean_Server_instFromJsonCodeActionResolveData_fromJson(x_1);
if (lean_obj_tag(x_2) == 0)
{
uint8_t x_3; 
x_3 = !lean_is_exclusive(x_2);
if (x_3 == 0)
{
lean_object* x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_4 = lean_ctor_get(x_2, 0);
x_5 = 3;
x_6 = l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0_spec__0___closed__0;
x_7 = l_Lean_Json_compress(x_1);
x_8 = lean_string_append(x_6, x_7);
lean_dec_ref(x_7);
x_9 = l_Lean_Server_FileWorker_parseParams___redArg___closed__1;
x_10 = lean_string_append(x_8, x_9);
x_11 = lean_string_append(x_10, x_4);
lean_dec(x_4);
x_12 = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(x_12, 0, x_11);
lean_ctor_set_uint8(x_12, sizeof(void*)*1, x_5);
lean_ctor_set(x_2, 0, x_12);
return x_2;
}
else
{
lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; 
x_13 = lean_ctor_get(x_2, 0);
lean_inc(x_13);
lean_dec(x_2);
x_14 = 3;
x_15 = l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0_spec__0___closed__0;
x_16 = l_Lean_Json_compress(x_1);
x_17 = lean_string_append(x_15, x_16);
lean_dec_ref(x_16);
x_18 = l_Lean_Server_FileWorker_parseParams___redArg___closed__1;
x_19 = lean_string_append(x_17, x_18);
x_20 = lean_string_append(x_19, x_13);
lean_dec(x_13);
x_21 = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(x_21, 0, x_20);
lean_ctor_set_uint8(x_21, sizeof(void*)*1, x_14);
x_22 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_22, 0, x_21);
return x_22;
}
}
else
{
uint8_t x_23; 
lean_dec(x_1);
x_23 = !lean_is_exclusive(x_2);
if (x_23 == 0)
{
return x_2;
}
else
{
lean_object* x_24; lean_object* x_25; 
x_24 = lean_ctor_get(x_2, 0);
lean_inc(x_24);
lean_dec(x_2);
x_25 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_25, 0, x_24);
return x_25;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2___redArg(lean_object* x_1) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2_spec__2(x_1);
if (lean_obj_tag(x_3) == 0)
{
uint8_t x_4; 
x_4 = !lean_is_exclusive(x_3);
if (x_4 == 0)
{
lean_ctor_set_tag(x_3, 1);
return x_3;
}
else
{
lean_object* x_5; lean_object* x_6; 
x_5 = lean_ctor_get(x_3, 0);
lean_inc(x_5);
lean_dec(x_3);
x_6 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_6, 0, x_5);
return x_6;
}
}
else
{
uint8_t x_7; 
x_7 = !lean_is_exclusive(x_3);
if (x_7 == 0)
{
lean_ctor_set_tag(x_3, 0);
return x_3;
}
else
{
lean_object* x_8; lean_object* x_9; 
x_8 = lean_ctor_get(x_3, 0);
lean_inc(x_8);
lean_dec(x_3);
x_9 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_9, 0, x_8);
return x_9;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2___redArg(x_1);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__4_spec__4(lean_object* x_1) {
_start:
{
lean_object* x_2; 
lean_inc(x_1);
x_2 = l_Lean_Lsp_instFromJsonRpcCallParams_fromJson(x_1);
if (lean_obj_tag(x_2) == 0)
{
uint8_t x_3; 
x_3 = !lean_is_exclusive(x_2);
if (x_3 == 0)
{
lean_object* x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_4 = lean_ctor_get(x_2, 0);
x_5 = 3;
x_6 = l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0_spec__0___closed__0;
x_7 = l_Lean_Json_compress(x_1);
x_8 = lean_string_append(x_6, x_7);
lean_dec_ref(x_7);
x_9 = l_Lean_Server_FileWorker_parseParams___redArg___closed__1;
x_10 = lean_string_append(x_8, x_9);
x_11 = lean_string_append(x_10, x_4);
lean_dec(x_4);
x_12 = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(x_12, 0, x_11);
lean_ctor_set_uint8(x_12, sizeof(void*)*1, x_5);
lean_ctor_set(x_2, 0, x_12);
return x_2;
}
else
{
lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; 
x_13 = lean_ctor_get(x_2, 0);
lean_inc(x_13);
lean_dec(x_2);
x_14 = 3;
x_15 = l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0_spec__0___closed__0;
x_16 = l_Lean_Json_compress(x_1);
x_17 = lean_string_append(x_15, x_16);
lean_dec_ref(x_16);
x_18 = l_Lean_Server_FileWorker_parseParams___redArg___closed__1;
x_19 = lean_string_append(x_17, x_18);
x_20 = lean_string_append(x_19, x_13);
lean_dec(x_13);
x_21 = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(x_21, 0, x_20);
lean_ctor_set_uint8(x_21, sizeof(void*)*1, x_14);
x_22 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_22, 0, x_21);
return x_22;
}
}
else
{
uint8_t x_23; 
lean_dec(x_1);
x_23 = !lean_is_exclusive(x_2);
if (x_23 == 0)
{
return x_2;
}
else
{
lean_object* x_24; lean_object* x_25; 
x_24 = lean_ctor_get(x_2, 0);
lean_inc(x_24);
lean_dec(x_2);
x_25 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_25, 0, x_24);
return x_25;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__4___redArg(lean_object* x_1) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__4_spec__4(x_1);
if (lean_obj_tag(x_3) == 0)
{
uint8_t x_4; 
x_4 = !lean_is_exclusive(x_3);
if (x_4 == 0)
{
lean_ctor_set_tag(x_3, 1);
return x_3;
}
else
{
lean_object* x_5; lean_object* x_6; 
x_5 = lean_ctor_get(x_3, 0);
lean_inc(x_5);
lean_dec(x_3);
x_6 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_6, 0, x_5);
return x_6;
}
}
else
{
uint8_t x_7; 
x_7 = !lean_is_exclusive(x_3);
if (x_7 == 0)
{
lean_ctor_set_tag(x_3, 0);
return x_3;
}
else
{
lean_object* x_8; lean_object* x_9; 
x_8 = lean_ctor_get(x_3, 0);
lean_inc(x_8);
lean_dec(x_3);
x_9 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_9, 0, x_8);
return x_9;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__4(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__4___redArg(x_1);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6_spec__6(lean_object* x_1) {
_start:
{
lean_object* x_2; 
lean_inc(x_1);
x_2 = l_Lean_Widget_instFromJsonGetInteractiveDiagnosticsParams_fromJson(x_1);
if (lean_obj_tag(x_2) == 0)
{
uint8_t x_3; 
x_3 = !lean_is_exclusive(x_2);
if (x_3 == 0)
{
lean_object* x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_4 = lean_ctor_get(x_2, 0);
x_5 = 3;
x_6 = l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0_spec__0___closed__0;
x_7 = l_Lean_Json_compress(x_1);
x_8 = lean_string_append(x_6, x_7);
lean_dec_ref(x_7);
x_9 = l_Lean_Server_FileWorker_parseParams___redArg___closed__1;
x_10 = lean_string_append(x_8, x_9);
x_11 = lean_string_append(x_10, x_4);
lean_dec(x_4);
x_12 = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(x_12, 0, x_11);
lean_ctor_set_uint8(x_12, sizeof(void*)*1, x_5);
lean_ctor_set(x_2, 0, x_12);
return x_2;
}
else
{
lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; 
x_13 = lean_ctor_get(x_2, 0);
lean_inc(x_13);
lean_dec(x_2);
x_14 = 3;
x_15 = l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0_spec__0___closed__0;
x_16 = l_Lean_Json_compress(x_1);
x_17 = lean_string_append(x_15, x_16);
lean_dec_ref(x_16);
x_18 = l_Lean_Server_FileWorker_parseParams___redArg___closed__1;
x_19 = lean_string_append(x_17, x_18);
x_20 = lean_string_append(x_19, x_13);
lean_dec(x_13);
x_21 = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(x_21, 0, x_20);
lean_ctor_set_uint8(x_21, sizeof(void*)*1, x_14);
x_22 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_22, 0, x_21);
return x_22;
}
}
else
{
uint8_t x_23; 
lean_dec(x_1);
x_23 = !lean_is_exclusive(x_2);
if (x_23 == 0)
{
return x_2;
}
else
{
lean_object* x_24; lean_object* x_25; 
x_24 = lean_ctor_get(x_2, 0);
lean_inc(x_24);
lean_dec(x_2);
x_25 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_25, 0, x_24);
return x_25;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6___redArg(lean_object* x_1) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6_spec__6(x_1);
if (lean_obj_tag(x_3) == 0)
{
uint8_t x_4; 
x_4 = !lean_is_exclusive(x_3);
if (x_4 == 0)
{
lean_ctor_set_tag(x_3, 1);
return x_3;
}
else
{
lean_object* x_5; lean_object* x_6; 
x_5 = lean_ctor_get(x_3, 0);
lean_inc(x_5);
lean_dec(x_3);
x_6 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_6, 0, x_5);
return x_6;
}
}
else
{
uint8_t x_7; 
x_7 = !lean_is_exclusive(x_3);
if (x_7 == 0)
{
lean_ctor_set_tag(x_3, 0);
return x_3;
}
else
{
lean_object* x_8; lean_object* x_9; 
x_8 = lean_ctor_get(x_3, 0);
lean_inc(x_8);
lean_dec(x_3);
x_9 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_9, 0, x_8);
return x_9;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6___redArg(x_1);
return x_4;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8_spec__8___redArg(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint8_t x_6; 
x_6 = lean_usize_dec_lt(x_3, x_2);
if (x_6 == 0)
{
lean_object* x_7; 
lean_dec_ref(x_1);
x_7 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_7, 0, x_4);
lean_ctor_set(x_7, 1, x_5);
return x_7;
}
else
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; size_t x_14; size_t x_15; lean_object* x_16; 
x_8 = lean_array_uget(x_4, x_3);
lean_inc_ref(x_1);
x_9 = l_Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8___redArg(x_1, x_8, x_5);
x_10 = lean_ctor_get(x_9, 0);
lean_inc(x_10);
x_11 = lean_ctor_get(x_9, 1);
lean_inc(x_11);
lean_dec_ref(x_9);
x_12 = lean_unsigned_to_nat(0u);
x_13 = lean_array_uset(x_4, x_3, x_12);
x_14 = 1;
x_15 = lean_usize_add(x_3, x_14);
x_16 = lean_array_uset(x_13, x_3, x_10);
x_3 = x_15;
x_4 = x_16;
x_5 = x_11;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
switch (lean_obj_tag(x_2)) {
case 0:
{
uint8_t x_4; 
lean_dec_ref(x_1);
x_4 = !lean_is_exclusive(x_2);
if (x_4 == 0)
{
lean_object* x_5; 
x_5 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_5, 0, x_2);
lean_ctor_set(x_5, 1, x_3);
return x_5;
}
else
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; 
x_6 = lean_ctor_get(x_2, 0);
lean_inc(x_6);
lean_dec(x_2);
x_7 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_7, 0, x_6);
x_8 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_8, 0, x_7);
lean_ctor_set(x_8, 1, x_3);
return x_8;
}
}
case 1:
{
uint8_t x_9; 
x_9 = !lean_is_exclusive(x_2);
if (x_9 == 0)
{
lean_object* x_10; size_t x_11; size_t x_12; lean_object* x_13; uint8_t x_14; 
x_10 = lean_ctor_get(x_2, 0);
x_11 = lean_array_size(x_10);
x_12 = 0;
x_13 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8_spec__8___redArg(x_1, x_11, x_12, x_10, x_3);
x_14 = !lean_is_exclusive(x_13);
if (x_14 == 0)
{
lean_object* x_15; 
x_15 = lean_ctor_get(x_13, 0);
lean_ctor_set(x_2, 0, x_15);
lean_ctor_set(x_13, 0, x_2);
return x_13;
}
else
{
lean_object* x_16; lean_object* x_17; lean_object* x_18; 
x_16 = lean_ctor_get(x_13, 0);
x_17 = lean_ctor_get(x_13, 1);
lean_inc(x_17);
lean_inc(x_16);
lean_dec(x_13);
lean_ctor_set(x_2, 0, x_16);
x_18 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_18, 0, x_2);
lean_ctor_set(x_18, 1, x_17);
return x_18;
}
}
else
{
lean_object* x_19; size_t x_20; size_t x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; 
x_19 = lean_ctor_get(x_2, 0);
lean_inc(x_19);
lean_dec(x_2);
x_20 = lean_array_size(x_19);
x_21 = 0;
x_22 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8_spec__8___redArg(x_1, x_20, x_21, x_19, x_3);
x_23 = lean_ctor_get(x_22, 0);
lean_inc(x_23);
x_24 = lean_ctor_get(x_22, 1);
lean_inc(x_24);
if (lean_is_exclusive(x_22)) {
 lean_ctor_release(x_22, 0);
 lean_ctor_release(x_22, 1);
 x_25 = x_22;
} else {
 lean_dec_ref(x_22);
 x_25 = lean_box(0);
}
x_26 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_26, 0, x_23);
if (lean_is_scalar(x_25)) {
 x_27 = lean_alloc_ctor(0, 2, 0);
} else {
 x_27 = x_25;
}
lean_ctor_set(x_27, 0, x_26);
lean_ctor_set(x_27, 1, x_24);
return x_27;
}
}
default: 
{
uint8_t x_28; 
x_28 = !lean_is_exclusive(x_2);
if (x_28 == 0)
{
lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; 
x_29 = lean_ctor_get(x_2, 0);
x_30 = lean_ctor_get(x_2, 1);
lean_inc_ref(x_1);
x_31 = lean_apply_2(x_1, x_29, x_3);
x_32 = lean_ctor_get(x_31, 0);
lean_inc(x_32);
x_33 = lean_ctor_get(x_31, 1);
lean_inc(x_33);
lean_dec_ref(x_31);
x_34 = l_Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8___redArg(x_1, x_30, x_33);
x_35 = !lean_is_exclusive(x_34);
if (x_35 == 0)
{
lean_object* x_36; 
x_36 = lean_ctor_get(x_34, 0);
lean_ctor_set(x_2, 1, x_36);
lean_ctor_set(x_2, 0, x_32);
lean_ctor_set(x_34, 0, x_2);
return x_34;
}
else
{
lean_object* x_37; lean_object* x_38; lean_object* x_39; 
x_37 = lean_ctor_get(x_34, 0);
x_38 = lean_ctor_get(x_34, 1);
lean_inc(x_38);
lean_inc(x_37);
lean_dec(x_34);
lean_ctor_set(x_2, 1, x_37);
lean_ctor_set(x_2, 0, x_32);
x_39 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_39, 0, x_2);
lean_ctor_set(x_39, 1, x_38);
return x_39;
}
}
else
{
lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; 
x_40 = lean_ctor_get(x_2, 0);
x_41 = lean_ctor_get(x_2, 1);
lean_inc(x_41);
lean_inc(x_40);
lean_dec(x_2);
lean_inc_ref(x_1);
x_42 = lean_apply_2(x_1, x_40, x_3);
x_43 = lean_ctor_get(x_42, 0);
lean_inc(x_43);
x_44 = lean_ctor_get(x_42, 1);
lean_inc(x_44);
lean_dec_ref(x_42);
x_45 = l_Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8___redArg(x_1, x_41, x_44);
x_46 = lean_ctor_get(x_45, 0);
lean_inc(x_46);
x_47 = lean_ctor_get(x_45, 1);
lean_inc(x_47);
if (lean_is_exclusive(x_45)) {
 lean_ctor_release(x_45, 0);
 lean_ctor_release(x_45, 1);
 x_48 = x_45;
} else {
 lean_dec_ref(x_45);
 x_48 = lean_box(0);
}
x_49 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_49, 0, x_43);
lean_ctor_set(x_49, 1, x_46);
if (lean_is_scalar(x_48)) {
 x_50 = lean_alloc_ctor(0, 2, 0);
} else {
 x_50 = x_48;
}
lean_ctor_set(x_50, 0, x_49);
lean_ctor_set(x_50, 1, x_47);
return x_50;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8___redArg(x_3, x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8_spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_t x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8_spec__8___redArg(x_3, x_4, x_5, x_6, x_7);
return x_8;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14_spec__14(size_t x_1, size_t x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; 
x_4 = lean_usize_dec_lt(x_2, x_1);
if (x_4 == 0)
{
return x_3;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; 
x_5 = lean_array_uget(x_3, x_2);
x_6 = lean_unsigned_to_nat(0u);
x_7 = lean_array_uset(x_3, x_2, x_6);
x_8 = 1;
x_9 = lean_usize_add(x_2, x_8);
x_10 = lean_array_uset(x_7, x_2, x_5);
x_2 = x_9;
x_3 = x_10;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l_Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14(lean_object* x_1) {
_start:
{
size_t x_2; size_t x_3; lean_object* x_4; lean_object* x_5; 
x_2 = lean_array_size(x_1);
x_3 = 0;
x_4 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14_spec__14(x_2, x_3, x_1);
x_5 = lean_alloc_ctor(4, 1, 0);
lean_ctor_set(x_5, 0, x_4);
return x_5;
}
}
static lean_object* _init_l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("text", 4, 4);
return x_1;
}
}
static lean_object* _init_l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("append", 6, 6);
return x_1;
}
}
static lean_object* _init_l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("tag", 3, 3);
return x_1;
}
}
static lean_object* _init_l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(2u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10(lean_object* x_1) {
_start:
{
switch (lean_obj_tag(x_1)) {
case 0:
{
uint8_t x_2; 
x_2 = !lean_is_exclusive(x_1);
if (x_2 == 0)
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; 
x_3 = l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__0;
lean_ctor_set_tag(x_1, 3);
x_4 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_4, 0, x_3);
lean_ctor_set(x_4, 1, x_1);
x_5 = lean_box(0);
x_6 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_6, 0, x_4);
lean_ctor_set(x_6, 1, x_5);
x_7 = l_Lean_Json_mkObj(x_6);
return x_7;
}
else
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 
x_8 = lean_ctor_get(x_1, 0);
lean_inc(x_8);
lean_dec(x_1);
x_9 = l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__0;
x_10 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_10, 0, x_8);
x_11 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_11, 0, x_9);
lean_ctor_set(x_11, 1, x_10);
x_12 = lean_box(0);
x_13 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_13, 0, x_11);
lean_ctor_set(x_13, 1, x_12);
x_14 = l_Lean_Json_mkObj(x_13);
return x_14;
}
}
case 1:
{
lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; 
x_15 = lean_ctor_get(x_1, 0);
lean_inc_ref(x_15);
lean_dec_ref(x_1);
x_16 = l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__1;
x_17 = l_Array_toJson___at___00Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10_spec__10(x_15);
x_18 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_18, 0, x_16);
lean_ctor_set(x_18, 1, x_17);
x_19 = lean_box(0);
x_20 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_20, 0, x_18);
lean_ctor_set(x_20, 1, x_19);
x_21 = l_Lean_Json_mkObj(x_20);
return x_21;
}
default: 
{
uint8_t x_22; 
x_22 = !lean_is_exclusive(x_1);
if (x_22 == 0)
{
lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; 
x_23 = lean_ctor_get(x_1, 0);
x_24 = lean_ctor_get(x_1, 1);
x_25 = l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__2;
x_26 = l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10(x_24);
x_27 = l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__3;
x_28 = lean_array_push(x_27, x_23);
x_29 = lean_array_push(x_28, x_26);
x_30 = lean_alloc_ctor(4, 1, 0);
lean_ctor_set(x_30, 0, x_29);
lean_ctor_set_tag(x_1, 0);
lean_ctor_set(x_1, 1, x_30);
lean_ctor_set(x_1, 0, x_25);
x_31 = lean_box(0);
x_32 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_32, 0, x_1);
lean_ctor_set(x_32, 1, x_31);
x_33 = l_Lean_Json_mkObj(x_32);
return x_33;
}
else
{
lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; 
x_34 = lean_ctor_get(x_1, 0);
x_35 = lean_ctor_get(x_1, 1);
lean_inc(x_35);
lean_inc(x_34);
lean_dec(x_1);
x_36 = l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__2;
x_37 = l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10(x_35);
x_38 = l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__3;
x_39 = lean_array_push(x_38, x_34);
x_40 = lean_array_push(x_39, x_37);
x_41 = lean_alloc_ctor(4, 1, 0);
lean_ctor_set(x_41, 0, x_40);
x_42 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_42, 0, x_36);
lean_ctor_set(x_42, 1, x_41);
x_43 = lean_box(0);
x_44 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_44, 0, x_42);
lean_ctor_set(x_44, 1, x_43);
x_45 = l_Lean_Json_mkObj(x_44);
return x_45;
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10_spec__10_spec__10(size_t x_1, size_t x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; 
x_4 = lean_usize_dec_lt(x_2, x_1);
if (x_4 == 0)
{
return x_3;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; size_t x_9; size_t x_10; lean_object* x_11; 
x_5 = lean_array_uget(x_3, x_2);
x_6 = lean_unsigned_to_nat(0u);
x_7 = lean_array_uset(x_3, x_2, x_6);
x_8 = l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10(x_5);
x_9 = 1;
x_10 = lean_usize_add(x_2, x_9);
x_11 = lean_array_uset(x_7, x_2, x_8);
x_2 = x_10;
x_3 = x_11;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l_Array_toJson___at___00Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10_spec__10(lean_object* x_1) {
_start:
{
size_t x_2; size_t x_3; lean_object* x_4; lean_object* x_5; 
x_2 = lean_array_size(x_1);
x_3 = 0;
x_4 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10_spec__10_spec__10(x_2, x_3, x_1);
x_5 = lean_alloc_ctor(4, 1, 0);
lean_ctor_set(x_5, 0, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__13(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; 
x_5 = lean_usize_dec_lt(x_2, x_1);
if (x_5 == 0)
{
lean_object* x_6; 
x_6 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_6, 0, x_3);
lean_ctor_set(x_6, 1, x_4);
return x_6;
}
else
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; size_t x_11; size_t x_12; lean_object* x_13; 
x_7 = lean_array_uget(x_3, x_2);
x_8 = lean_unsigned_to_nat(0u);
x_9 = lean_array_uset(x_3, x_2, x_8);
x_10 = l_Lean_Lsp_instToJsonDiagnosticRelatedInformation_toJson(x_7);
x_11 = 1;
x_12 = lean_usize_add(x_2, x_11);
x_13 = lean_array_uset(x_9, x_2, x_10);
x_2 = x_12;
x_3 = x_13;
goto _start;
}
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(1u);
x_2 = l_Lean_JsonNumber_fromNat(x_1);
return x_2;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__0;
x_2 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(2u);
x_2 = l_Lean_JsonNumber_fromNat(x_1);
return x_2;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__2;
x_2 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; 
x_5 = lean_usize_dec_lt(x_2, x_1);
if (x_5 == 0)
{
lean_object* x_6; 
x_6 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_6, 0, x_3);
lean_ctor_set(x_6, 1, x_4);
return x_6;
}
else
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_17; 
x_7 = lean_array_uget(x_3, x_2);
x_8 = lean_unsigned_to_nat(0u);
x_9 = lean_array_uset(x_3, x_2, x_8);
x_17 = lean_unbox(x_7);
lean_dec(x_7);
if (x_17 == 0)
{
lean_object* x_18; 
x_18 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__1;
x_10 = x_18;
x_11 = x_4;
goto block_16;
}
else
{
lean_object* x_19; 
x_19 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__3;
x_10 = x_19;
x_11 = x_4;
goto block_16;
}
block_16:
{
size_t x_12; size_t x_13; lean_object* x_14; 
x_12 = 1;
x_13 = lean_usize_add(x_2, x_12);
x_14 = lean_array_uset(x_9, x_2, x_10);
x_2 = x_13;
x_3 = x_14;
x_4 = x_11;
goto _start;
}
}
}
}
static lean_object* _init_l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lean_Widget_instRpcEncodableMsgEmbed_enc_00___x40_Lean_Widget_InteractiveDiagnostic_1765450820____hygCtx___hyg_1_), 2, 0);
return x_1;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__17(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; 
x_5 = lean_usize_dec_lt(x_2, x_1);
if (x_5 == 0)
{
lean_object* x_6; 
x_6 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_6, 0, x_3);
lean_ctor_set(x_6, 1, x_4);
return x_6;
}
else
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_17; 
x_7 = lean_array_uget(x_3, x_2);
x_8 = lean_unsigned_to_nat(0u);
x_9 = lean_array_uset(x_3, x_2, x_8);
x_17 = lean_unbox(x_7);
lean_dec(x_7);
if (x_17 == 0)
{
lean_object* x_18; 
x_18 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__1;
x_10 = x_18;
x_11 = x_4;
goto block_16;
}
else
{
lean_object* x_19; 
x_19 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__3;
x_10 = x_19;
x_11 = x_4;
goto block_16;
}
block_16:
{
size_t x_12; size_t x_13; lean_object* x_14; 
x_12 = 1;
x_13 = lean_usize_add(x_2, x_12);
x_14 = lean_array_uset(x_9, x_2, x_10);
x_2 = x_13;
x_3 = x_14;
x_4 = x_11;
goto _start;
}
}
}
}
static lean_object* _init_l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(3u);
x_2 = l_Lean_JsonNumber_fromNat(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__1;
x_2 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(4u);
x_2 = l_Lean_JsonNumber_fromNat(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__3;
x_2 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_166; lean_object* x_167; 
x_3 = lean_ctor_get(x_1, 0);
lean_inc_ref(x_3);
x_4 = lean_ctor_get(x_1, 1);
lean_inc(x_4);
x_5 = lean_ctor_get(x_1, 2);
lean_inc(x_5);
x_6 = lean_ctor_get(x_1, 3);
lean_inc(x_6);
x_7 = lean_ctor_get(x_1, 4);
lean_inc(x_7);
x_8 = lean_ctor_get(x_1, 5);
lean_inc(x_8);
x_9 = lean_ctor_get(x_1, 6);
lean_inc(x_9);
x_10 = lean_ctor_get(x_1, 7);
lean_inc(x_10);
x_11 = lean_ctor_get(x_1, 8);
lean_inc(x_11);
x_12 = lean_ctor_get(x_1, 9);
lean_inc(x_12);
x_13 = lean_ctor_get(x_1, 10);
lean_inc(x_13);
if (lean_is_exclusive(x_1)) {
 lean_ctor_release(x_1, 0);
 lean_ctor_release(x_1, 1);
 lean_ctor_release(x_1, 2);
 lean_ctor_release(x_1, 3);
 lean_ctor_release(x_1, 4);
 lean_ctor_release(x_1, 5);
 lean_ctor_release(x_1, 6);
 lean_ctor_release(x_1, 7);
 lean_ctor_release(x_1, 8);
 lean_ctor_release(x_1, 9);
 lean_ctor_release(x_1, 10);
 x_14 = x_1;
} else {
 lean_dec_ref(x_1);
 x_14 = lean_box(0);
}
x_15 = l_Lean_Lsp_instToJsonRange_toJson(x_3);
if (lean_obj_tag(x_4) == 0)
{
lean_object* x_176; 
x_176 = lean_box(0);
x_166 = x_176;
x_167 = x_2;
goto block_175;
}
else
{
uint8_t x_177; 
x_177 = !lean_is_exclusive(x_4);
if (x_177 == 0)
{
lean_object* x_178; lean_object* x_179; 
x_178 = lean_ctor_get(x_4, 0);
x_179 = l_Lean_Lsp_instToJsonRange_toJson(x_178);
lean_ctor_set(x_4, 0, x_179);
x_166 = x_4;
x_167 = x_2;
goto block_175;
}
else
{
lean_object* x_180; lean_object* x_181; lean_object* x_182; 
x_180 = lean_ctor_get(x_4, 0);
lean_inc(x_180);
lean_dec(x_4);
x_181 = l_Lean_Lsp_instToJsonRange_toJson(x_180);
x_182 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_182, 0, x_181);
x_166 = x_182;
x_167 = x_2;
goto block_175;
}
}
block_29:
{
lean_object* x_26; lean_object* x_27; lean_object* x_28; 
if (lean_is_scalar(x_14)) {
 x_26 = lean_alloc_ctor(0, 11, 0);
} else {
 x_26 = x_14;
}
lean_ctor_set(x_26, 0, x_15);
lean_ctor_set(x_26, 1, x_19);
lean_ctor_set(x_26, 2, x_21);
lean_ctor_set(x_26, 3, x_22);
lean_ctor_set(x_26, 4, x_18);
lean_ctor_set(x_26, 5, x_17);
lean_ctor_set(x_26, 6, x_20);
lean_ctor_set(x_26, 7, x_16);
lean_ctor_set(x_26, 8, x_23);
lean_ctor_set(x_26, 9, x_24);
lean_ctor_set(x_26, 10, x_13);
x_27 = l_Lean_Widget_instToJsonRpcEncodablePacket_toJson_00___x40_Lean_Widget_InteractiveDiagnostic_3833933514____hygCtx___hyg_123_(x_26);
lean_dec_ref(x_26);
x_28 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_28, 0, x_27);
lean_ctor_set(x_28, 1, x_25);
return x_28;
}
block_56:
{
if (lean_obj_tag(x_12) == 0)
{
lean_object* x_39; 
x_39 = lean_box(0);
x_16 = x_31;
x_17 = x_30;
x_18 = x_32;
x_19 = x_33;
x_20 = x_34;
x_21 = x_35;
x_22 = x_36;
x_23 = x_37;
x_24 = x_39;
x_25 = x_38;
goto block_29;
}
else
{
uint8_t x_40; 
x_40 = !lean_is_exclusive(x_12);
if (x_40 == 0)
{
lean_object* x_41; size_t x_42; size_t x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; 
x_41 = lean_ctor_get(x_12, 0);
x_42 = lean_array_size(x_41);
x_43 = 0;
x_44 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__13(x_42, x_43, x_41, x_38);
x_45 = lean_ctor_get(x_44, 0);
lean_inc(x_45);
x_46 = lean_ctor_get(x_44, 1);
lean_inc(x_46);
lean_dec_ref(x_44);
x_47 = l_Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14(x_45);
lean_ctor_set(x_12, 0, x_47);
x_16 = x_31;
x_17 = x_30;
x_18 = x_32;
x_19 = x_33;
x_20 = x_34;
x_21 = x_35;
x_22 = x_36;
x_23 = x_37;
x_24 = x_12;
x_25 = x_46;
goto block_29;
}
else
{
lean_object* x_48; size_t x_49; size_t x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; 
x_48 = lean_ctor_get(x_12, 0);
lean_inc(x_48);
lean_dec(x_12);
x_49 = lean_array_size(x_48);
x_50 = 0;
x_51 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__13(x_49, x_50, x_48, x_38);
x_52 = lean_ctor_get(x_51, 0);
lean_inc(x_52);
x_53 = lean_ctor_get(x_51, 1);
lean_inc(x_53);
lean_dec_ref(x_51);
x_54 = l_Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14(x_52);
x_55 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_55, 0, x_54);
x_16 = x_31;
x_17 = x_30;
x_18 = x_32;
x_19 = x_33;
x_20 = x_34;
x_21 = x_35;
x_22 = x_36;
x_23 = x_37;
x_24 = x_55;
x_25 = x_53;
goto block_29;
}
}
}
block_82:
{
if (lean_obj_tag(x_11) == 0)
{
lean_object* x_65; 
x_65 = lean_box(0);
x_30 = x_57;
x_31 = x_63;
x_32 = x_58;
x_33 = x_59;
x_34 = x_60;
x_35 = x_61;
x_36 = x_62;
x_37 = x_65;
x_38 = x_64;
goto block_56;
}
else
{
uint8_t x_66; 
x_66 = !lean_is_exclusive(x_11);
if (x_66 == 0)
{
lean_object* x_67; size_t x_68; size_t x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; 
x_67 = lean_ctor_get(x_11, 0);
x_68 = lean_array_size(x_67);
x_69 = 0;
x_70 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16(x_68, x_69, x_67, x_64);
x_71 = lean_ctor_get(x_70, 0);
lean_inc(x_71);
x_72 = lean_ctor_get(x_70, 1);
lean_inc(x_72);
lean_dec_ref(x_70);
x_73 = l_Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14(x_71);
lean_ctor_set(x_11, 0, x_73);
x_30 = x_57;
x_31 = x_63;
x_32 = x_58;
x_33 = x_59;
x_34 = x_60;
x_35 = x_61;
x_36 = x_62;
x_37 = x_11;
x_38 = x_72;
goto block_56;
}
else
{
lean_object* x_74; size_t x_75; size_t x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; 
x_74 = lean_ctor_get(x_11, 0);
lean_inc(x_74);
lean_dec(x_11);
x_75 = lean_array_size(x_74);
x_76 = 0;
x_77 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16(x_75, x_76, x_74, x_64);
x_78 = lean_ctor_get(x_77, 0);
lean_inc(x_78);
x_79 = lean_ctor_get(x_77, 1);
lean_inc(x_79);
lean_dec_ref(x_77);
x_80 = l_Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14(x_78);
x_81 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_81, 0, x_80);
x_30 = x_57;
x_31 = x_63;
x_32 = x_58;
x_33 = x_59;
x_34 = x_60;
x_35 = x_61;
x_36 = x_62;
x_37 = x_81;
x_38 = x_79;
goto block_56;
}
}
}
block_111:
{
lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; 
x_89 = l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__0;
x_90 = l_Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8___redArg(x_89, x_9, x_88);
x_91 = lean_ctor_get(x_90, 0);
lean_inc(x_91);
x_92 = lean_ctor_get(x_90, 1);
lean_inc(x_92);
lean_dec_ref(x_90);
x_93 = l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10(x_91);
if (lean_obj_tag(x_10) == 0)
{
lean_object* x_94; 
x_94 = lean_box(0);
x_57 = x_87;
x_58 = x_83;
x_59 = x_84;
x_60 = x_93;
x_61 = x_85;
x_62 = x_86;
x_63 = x_94;
x_64 = x_92;
goto block_82;
}
else
{
uint8_t x_95; 
x_95 = !lean_is_exclusive(x_10);
if (x_95 == 0)
{
lean_object* x_96; size_t x_97; size_t x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; 
x_96 = lean_ctor_get(x_10, 0);
x_97 = lean_array_size(x_96);
x_98 = 0;
x_99 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__17(x_97, x_98, x_96, x_92);
x_100 = lean_ctor_get(x_99, 0);
lean_inc(x_100);
x_101 = lean_ctor_get(x_99, 1);
lean_inc(x_101);
lean_dec_ref(x_99);
x_102 = l_Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14(x_100);
lean_ctor_set(x_10, 0, x_102);
x_57 = x_87;
x_58 = x_83;
x_59 = x_84;
x_60 = x_93;
x_61 = x_85;
x_62 = x_86;
x_63 = x_10;
x_64 = x_101;
goto block_82;
}
else
{
lean_object* x_103; size_t x_104; size_t x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; 
x_103 = lean_ctor_get(x_10, 0);
lean_inc(x_103);
lean_dec(x_10);
x_104 = lean_array_size(x_103);
x_105 = 0;
x_106 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__17(x_104, x_105, x_103, x_92);
x_107 = lean_ctor_get(x_106, 0);
lean_inc(x_107);
x_108 = lean_ctor_get(x_106, 1);
lean_inc(x_108);
lean_dec_ref(x_106);
x_109 = l_Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14(x_107);
x_110 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_110, 0, x_109);
x_57 = x_87;
x_58 = x_83;
x_59 = x_84;
x_60 = x_93;
x_61 = x_85;
x_62 = x_86;
x_63 = x_110;
x_64 = x_108;
goto block_82;
}
}
}
block_124:
{
if (lean_obj_tag(x_8) == 0)
{
lean_object* x_117; 
x_117 = lean_box(0);
x_83 = x_115;
x_84 = x_112;
x_85 = x_113;
x_86 = x_114;
x_87 = x_117;
x_88 = x_116;
goto block_111;
}
else
{
uint8_t x_118; 
x_118 = !lean_is_exclusive(x_8);
if (x_118 == 0)
{
lean_object* x_119; lean_object* x_120; 
x_119 = lean_ctor_get(x_8, 0);
x_120 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_120, 0, x_119);
lean_ctor_set(x_8, 0, x_120);
x_83 = x_115;
x_84 = x_112;
x_85 = x_113;
x_86 = x_114;
x_87 = x_8;
x_88 = x_116;
goto block_111;
}
else
{
lean_object* x_121; lean_object* x_122; lean_object* x_123; 
x_121 = lean_ctor_get(x_8, 0);
lean_inc(x_121);
lean_dec(x_8);
x_122 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_122, 0, x_121);
x_123 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_123, 0, x_122);
x_83 = x_115;
x_84 = x_112;
x_85 = x_113;
x_86 = x_114;
x_87 = x_123;
x_88 = x_116;
goto block_111;
}
}
}
block_131:
{
lean_object* x_130; 
x_130 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_130, 0, x_128);
x_112 = x_125;
x_113 = x_126;
x_114 = x_127;
x_115 = x_130;
x_116 = x_129;
goto block_124;
}
block_147:
{
if (lean_obj_tag(x_7) == 0)
{
lean_object* x_136; 
x_136 = lean_box(0);
x_112 = x_132;
x_113 = x_133;
x_114 = x_134;
x_115 = x_136;
x_116 = x_135;
goto block_124;
}
else
{
lean_object* x_137; 
x_137 = lean_ctor_get(x_7, 0);
lean_inc(x_137);
lean_dec_ref(x_7);
if (lean_obj_tag(x_137) == 0)
{
uint8_t x_138; 
x_138 = !lean_is_exclusive(x_137);
if (x_138 == 0)
{
lean_object* x_139; lean_object* x_140; 
x_139 = lean_ctor_get(x_137, 0);
x_140 = l_Lean_JsonNumber_fromInt(x_139);
lean_ctor_set_tag(x_137, 2);
lean_ctor_set(x_137, 0, x_140);
x_125 = x_132;
x_126 = x_133;
x_127 = x_134;
x_128 = x_137;
x_129 = x_135;
goto block_131;
}
else
{
lean_object* x_141; lean_object* x_142; lean_object* x_143; 
x_141 = lean_ctor_get(x_137, 0);
lean_inc(x_141);
lean_dec(x_137);
x_142 = l_Lean_JsonNumber_fromInt(x_141);
x_143 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_143, 0, x_142);
x_125 = x_132;
x_126 = x_133;
x_127 = x_134;
x_128 = x_143;
x_129 = x_135;
goto block_131;
}
}
else
{
uint8_t x_144; 
x_144 = !lean_is_exclusive(x_137);
if (x_144 == 0)
{
lean_ctor_set_tag(x_137, 3);
x_125 = x_132;
x_126 = x_133;
x_127 = x_134;
x_128 = x_137;
x_129 = x_135;
goto block_131;
}
else
{
lean_object* x_145; lean_object* x_146; 
x_145 = lean_ctor_get(x_137, 0);
lean_inc(x_145);
lean_dec(x_137);
x_146 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_146, 0, x_145);
x_125 = x_132;
x_126 = x_133;
x_127 = x_134;
x_128 = x_146;
x_129 = x_135;
goto block_131;
}
}
}
}
block_160:
{
if (lean_obj_tag(x_6) == 0)
{
lean_object* x_151; 
x_151 = lean_box(0);
x_132 = x_148;
x_133 = x_149;
x_134 = x_151;
x_135 = x_150;
goto block_147;
}
else
{
uint8_t x_152; 
x_152 = !lean_is_exclusive(x_6);
if (x_152 == 0)
{
lean_object* x_153; lean_object* x_154; uint8_t x_155; 
x_153 = lean_ctor_get(x_6, 0);
x_154 = lean_alloc_ctor(1, 0, 1);
x_155 = lean_unbox(x_153);
lean_dec(x_153);
lean_ctor_set_uint8(x_154, 0, x_155);
lean_ctor_set(x_6, 0, x_154);
x_132 = x_148;
x_133 = x_149;
x_134 = x_6;
x_135 = x_150;
goto block_147;
}
else
{
lean_object* x_156; lean_object* x_157; uint8_t x_158; lean_object* x_159; 
x_156 = lean_ctor_get(x_6, 0);
lean_inc(x_156);
lean_dec(x_6);
x_157 = lean_alloc_ctor(1, 0, 1);
x_158 = lean_unbox(x_156);
lean_dec(x_156);
lean_ctor_set_uint8(x_157, 0, x_158);
x_159 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_159, 0, x_157);
x_132 = x_148;
x_133 = x_149;
x_134 = x_159;
x_135 = x_150;
goto block_147;
}
}
}
block_165:
{
lean_object* x_164; 
x_164 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_164, 0, x_162);
x_148 = x_161;
x_149 = x_164;
x_150 = x_163;
goto block_160;
}
block_175:
{
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_168; 
x_168 = lean_box(0);
x_148 = x_166;
x_149 = x_168;
x_150 = x_167;
goto block_160;
}
else
{
lean_object* x_169; uint8_t x_170; 
x_169 = lean_ctor_get(x_5, 0);
lean_inc(x_169);
lean_dec_ref(x_5);
x_170 = lean_unbox(x_169);
lean_dec(x_169);
switch (x_170) {
case 0:
{
lean_object* x_171; 
x_171 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__1;
x_161 = x_166;
x_162 = x_171;
x_163 = x_167;
goto block_165;
}
case 1:
{
lean_object* x_172; 
x_172 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__3;
x_161 = x_166;
x_162 = x_172;
x_163 = x_167;
goto block_165;
}
case 2:
{
lean_object* x_173; 
x_173 = l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__2;
x_161 = x_166;
x_162 = x_173;
x_163 = x_167;
goto block_165;
}
default: 
{
lean_object* x_174; 
x_174 = l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__4;
x_161 = x_166;
x_162 = x_174;
x_163 = x_167;
goto block_165;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__19(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; 
x_5 = lean_usize_dec_lt(x_2, x_1);
if (x_5 == 0)
{
lean_object* x_6; 
x_6 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_6, 0, x_3);
lean_ctor_set(x_6, 1, x_4);
return x_6;
}
else
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; size_t x_13; size_t x_14; lean_object* x_15; 
x_7 = lean_array_uget(x_3, x_2);
x_8 = l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8(x_7, x_4);
x_9 = lean_ctor_get(x_8, 0);
lean_inc(x_9);
x_10 = lean_ctor_get(x_8, 1);
lean_inc(x_10);
lean_dec_ref(x_8);
x_11 = lean_unsigned_to_nat(0u);
x_12 = lean_array_uset(x_3, x_2, x_11);
x_13 = 1;
x_14 = lean_usize_add(x_2, x_13);
x_15 = lean_array_uset(x_12, x_2, x_9);
x_2 = x_14;
x_3 = x_15;
x_4 = x_10;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, lean_object* x_5) {
_start:
{
lean_object* x_7; uint8_t x_8; 
x_7 = l_Lean_Server_FileWorker_waitAllUnknownIdentifierMessageRanges(x_1);
x_8 = l_Array_isEmpty___redArg(x_7);
if (x_8 == 0)
{
lean_object* x_9; 
lean_inc_ref(x_3);
x_9 = l_Lean_Server_FileWorker_handleResolveImportAllUnknownIdentifiersCodeAction_x3f(x_2, x_3, x_7, x_5);
lean_dec_ref(x_7);
if (lean_obj_tag(x_9) == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_10 = lean_ctor_get(x_9, 0);
lean_inc(x_10);
if (lean_is_exclusive(x_9)) {
 lean_ctor_release(x_9, 0);
 x_11 = x_9;
} else {
 lean_dec_ref(x_9);
 x_11 = lean_box(0);
}
if (lean_obj_tag(x_10) == 0)
{
x_12 = x_3;
goto block_18;
}
else
{
lean_object* x_19; 
lean_dec_ref(x_3);
x_19 = lean_ctor_get(x_10, 0);
lean_inc(x_19);
lean_dec_ref(x_10);
x_12 = x_19;
goto block_18;
}
block_18:
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; 
x_13 = l_Lean_Lsp_instToJsonCodeAction_toJson(x_12);
lean_inc(x_13);
x_14 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_14, 0, x_13);
x_15 = l_Lean_Json_compress(x_13);
x_16 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_16, 0, x_14);
lean_ctor_set(x_16, 1, x_15);
lean_ctor_set_uint8(x_16, sizeof(void*)*2, x_4);
if (lean_is_scalar(x_11)) {
 x_17 = lean_alloc_ctor(0, 1, 0);
} else {
 x_17 = x_11;
}
lean_ctor_set(x_17, 0, x_16);
return x_17;
}
}
else
{
uint8_t x_20; 
lean_dec_ref(x_3);
x_20 = !lean_is_exclusive(x_9);
if (x_20 == 0)
{
return x_9;
}
else
{
lean_object* x_21; lean_object* x_22; 
x_21 = lean_ctor_get(x_9, 0);
lean_inc(x_21);
lean_dec(x_9);
x_22 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_22, 0, x_21);
return x_22;
}
}
}
else
{
lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; 
lean_dec_ref(x_7);
lean_dec_ref(x_5);
lean_dec(x_2);
x_23 = l_Lean_Lsp_instToJsonCodeAction_toJson(x_3);
lean_inc(x_23);
x_24 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_24, 0, x_23);
x_25 = l_Lean_Json_compress(x_23);
x_26 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_26, 0, x_24);
lean_ctor_set(x_26, 1, x_25);
lean_ctor_set_uint8(x_26, sizeof(void*)*2, x_4);
x_27 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_27, 0, x_26);
return x_27;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__1(lean_object* x_1) {
_start:
{
lean_inc(x_1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__2(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("$/lean/rpc/call", 15, 15);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("codeAction/resolve", 18, 18);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = l_Lean_Server_FileWorker_importAllUnknownIdentifiersProvider;
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__3() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Expected a data field on CodeAction.", 36, 36);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__3;
x_2 = l_Lean_Server_RequestError_invalidParams(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__5() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Widget", 6, 6);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__6() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("getInteractiveDiagnostics", 25, 25);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__7() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; 
x_1 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__6;
x_2 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__5;
x_3 = l_Lean_Server_FileWorker_initFn___closed__5_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_;
x_4 = l_Lean_Name_mkStr3(x_3, x_2, x_1);
return x_4;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__8() {
_start:
{
lean_object* x_1; 
x_1 = l_Lean_Server_RequestError_rpcNeedsReconnect;
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
uint8_t x_7; lean_object* x_8; 
x_7 = lean_unbox(x_4);
x_8 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__0(x_1, x_2, x_3, x_7, x_5);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__1___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__1(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_8; uint8_t x_9; 
x_8 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__0;
x_9 = lean_string_dec_eq(x_4, x_8);
if (x_9 == 0)
{
lean_object* x_10; uint8_t x_11; 
x_10 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__1;
x_11 = lean_string_dec_eq(x_4, x_10);
if (x_11 == 0)
{
lean_object* x_12; lean_object* x_13; 
lean_dec_ref(x_6);
lean_dec(x_5);
lean_dec(x_3);
lean_dec_ref(x_2);
x_12 = lean_box(0);
x_13 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_13, 0, x_12);
return x_13;
}
else
{
lean_object* x_14; 
x_14 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0___redArg(x_5);
if (lean_obj_tag(x_14) == 0)
{
uint8_t x_15; 
x_15 = !lean_is_exclusive(x_14);
if (x_15 == 0)
{
lean_object* x_16; lean_object* x_17; 
x_16 = lean_ctor_get(x_14, 0);
x_17 = lean_ctor_get(x_16, 9);
lean_inc(x_17);
if (lean_obj_tag(x_17) == 1)
{
uint8_t x_18; 
lean_free_object(x_14);
x_18 = !lean_is_exclusive(x_17);
if (x_18 == 0)
{
lean_object* x_19; lean_object* x_20; 
x_19 = lean_ctor_get(x_17, 0);
x_20 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2___redArg(x_19);
if (lean_obj_tag(x_20) == 0)
{
uint8_t x_21; 
x_21 = !lean_is_exclusive(x_20);
if (x_21 == 0)
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; 
x_22 = lean_ctor_get(x_20, 0);
x_23 = lean_ctor_get(x_22, 1);
lean_inc(x_23);
lean_dec(x_22);
x_24 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__2;
x_25 = lean_name_eq(x_23, x_24);
lean_dec(x_23);
if (x_25 == 0)
{
lean_object* x_26; 
lean_free_object(x_17);
lean_dec(x_16);
lean_dec_ref(x_6);
lean_dec(x_3);
lean_dec_ref(x_2);
x_26 = lean_box(0);
lean_ctor_set(x_20, 0, x_26);
return x_20;
}
else
{
lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; 
lean_free_object(x_20);
x_27 = lean_ctor_get(x_2, 0);
lean_inc_ref(x_27);
lean_dec_ref(x_2);
x_28 = lean_box(x_25);
x_29 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__0___boxed), 6, 4);
lean_closure_set(x_29, 0, x_27);
lean_closure_set(x_29, 1, x_3);
lean_closure_set(x_29, 2, x_16);
lean_closure_set(x_29, 3, x_28);
x_30 = l_Lean_Server_RequestM_asTask___redArg(x_29, x_6);
if (lean_obj_tag(x_30) == 0)
{
uint8_t x_31; 
x_31 = !lean_is_exclusive(x_30);
if (x_31 == 0)
{
lean_object* x_32; 
x_32 = lean_ctor_get(x_30, 0);
lean_ctor_set(x_17, 0, x_32);
lean_ctor_set(x_30, 0, x_17);
return x_30;
}
else
{
lean_object* x_33; lean_object* x_34; 
x_33 = lean_ctor_get(x_30, 0);
lean_inc(x_33);
lean_dec(x_30);
lean_ctor_set(x_17, 0, x_33);
x_34 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_34, 0, x_17);
return x_34;
}
}
else
{
uint8_t x_35; 
lean_free_object(x_17);
x_35 = !lean_is_exclusive(x_30);
if (x_35 == 0)
{
return x_30;
}
else
{
lean_object* x_36; lean_object* x_37; 
x_36 = lean_ctor_get(x_30, 0);
lean_inc(x_36);
lean_dec(x_30);
x_37 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_37, 0, x_36);
return x_37;
}
}
}
}
else
{
lean_object* x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; 
x_38 = lean_ctor_get(x_20, 0);
lean_inc(x_38);
lean_dec(x_20);
x_39 = lean_ctor_get(x_38, 1);
lean_inc(x_39);
lean_dec(x_38);
x_40 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__2;
x_41 = lean_name_eq(x_39, x_40);
lean_dec(x_39);
if (x_41 == 0)
{
lean_object* x_42; lean_object* x_43; 
lean_free_object(x_17);
lean_dec(x_16);
lean_dec_ref(x_6);
lean_dec(x_3);
lean_dec_ref(x_2);
x_42 = lean_box(0);
x_43 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_43, 0, x_42);
return x_43;
}
else
{
lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; 
x_44 = lean_ctor_get(x_2, 0);
lean_inc_ref(x_44);
lean_dec_ref(x_2);
x_45 = lean_box(x_41);
x_46 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__0___boxed), 6, 4);
lean_closure_set(x_46, 0, x_44);
lean_closure_set(x_46, 1, x_3);
lean_closure_set(x_46, 2, x_16);
lean_closure_set(x_46, 3, x_45);
x_47 = l_Lean_Server_RequestM_asTask___redArg(x_46, x_6);
if (lean_obj_tag(x_47) == 0)
{
lean_object* x_48; lean_object* x_49; lean_object* x_50; 
x_48 = lean_ctor_get(x_47, 0);
lean_inc(x_48);
if (lean_is_exclusive(x_47)) {
 lean_ctor_release(x_47, 0);
 x_49 = x_47;
} else {
 lean_dec_ref(x_47);
 x_49 = lean_box(0);
}
lean_ctor_set(x_17, 0, x_48);
if (lean_is_scalar(x_49)) {
 x_50 = lean_alloc_ctor(0, 1, 0);
} else {
 x_50 = x_49;
}
lean_ctor_set(x_50, 0, x_17);
return x_50;
}
else
{
lean_object* x_51; lean_object* x_52; lean_object* x_53; 
lean_free_object(x_17);
x_51 = lean_ctor_get(x_47, 0);
lean_inc(x_51);
if (lean_is_exclusive(x_47)) {
 lean_ctor_release(x_47, 0);
 x_52 = x_47;
} else {
 lean_dec_ref(x_47);
 x_52 = lean_box(0);
}
if (lean_is_scalar(x_52)) {
 x_53 = lean_alloc_ctor(1, 1, 0);
} else {
 x_53 = x_52;
}
lean_ctor_set(x_53, 0, x_51);
return x_53;
}
}
}
}
else
{
uint8_t x_54; 
lean_free_object(x_17);
lean_dec(x_16);
lean_dec_ref(x_6);
lean_dec(x_3);
lean_dec_ref(x_2);
x_54 = !lean_is_exclusive(x_20);
if (x_54 == 0)
{
return x_20;
}
else
{
lean_object* x_55; lean_object* x_56; 
x_55 = lean_ctor_get(x_20, 0);
lean_inc(x_55);
lean_dec(x_20);
x_56 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_56, 0, x_55);
return x_56;
}
}
}
else
{
lean_object* x_57; lean_object* x_58; 
x_57 = lean_ctor_get(x_17, 0);
lean_inc(x_57);
lean_dec(x_17);
x_58 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2___redArg(x_57);
if (lean_obj_tag(x_58) == 0)
{
lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; uint8_t x_63; 
x_59 = lean_ctor_get(x_58, 0);
lean_inc(x_59);
if (lean_is_exclusive(x_58)) {
 lean_ctor_release(x_58, 0);
 x_60 = x_58;
} else {
 lean_dec_ref(x_58);
 x_60 = lean_box(0);
}
x_61 = lean_ctor_get(x_59, 1);
lean_inc(x_61);
lean_dec(x_59);
x_62 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__2;
x_63 = lean_name_eq(x_61, x_62);
lean_dec(x_61);
if (x_63 == 0)
{
lean_object* x_64; lean_object* x_65; 
lean_dec(x_16);
lean_dec_ref(x_6);
lean_dec(x_3);
lean_dec_ref(x_2);
x_64 = lean_box(0);
if (lean_is_scalar(x_60)) {
 x_65 = lean_alloc_ctor(0, 1, 0);
} else {
 x_65 = x_60;
}
lean_ctor_set(x_65, 0, x_64);
return x_65;
}
else
{
lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; 
lean_dec(x_60);
x_66 = lean_ctor_get(x_2, 0);
lean_inc_ref(x_66);
lean_dec_ref(x_2);
x_67 = lean_box(x_63);
x_68 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__0___boxed), 6, 4);
lean_closure_set(x_68, 0, x_66);
lean_closure_set(x_68, 1, x_3);
lean_closure_set(x_68, 2, x_16);
lean_closure_set(x_68, 3, x_67);
x_69 = l_Lean_Server_RequestM_asTask___redArg(x_68, x_6);
if (lean_obj_tag(x_69) == 0)
{
lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; 
x_70 = lean_ctor_get(x_69, 0);
lean_inc(x_70);
if (lean_is_exclusive(x_69)) {
 lean_ctor_release(x_69, 0);
 x_71 = x_69;
} else {
 lean_dec_ref(x_69);
 x_71 = lean_box(0);
}
x_72 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_72, 0, x_70);
if (lean_is_scalar(x_71)) {
 x_73 = lean_alloc_ctor(0, 1, 0);
} else {
 x_73 = x_71;
}
lean_ctor_set(x_73, 0, x_72);
return x_73;
}
else
{
lean_object* x_74; lean_object* x_75; lean_object* x_76; 
x_74 = lean_ctor_get(x_69, 0);
lean_inc(x_74);
if (lean_is_exclusive(x_69)) {
 lean_ctor_release(x_69, 0);
 x_75 = x_69;
} else {
 lean_dec_ref(x_69);
 x_75 = lean_box(0);
}
if (lean_is_scalar(x_75)) {
 x_76 = lean_alloc_ctor(1, 1, 0);
} else {
 x_76 = x_75;
}
lean_ctor_set(x_76, 0, x_74);
return x_76;
}
}
}
else
{
lean_object* x_77; lean_object* x_78; lean_object* x_79; 
lean_dec(x_16);
lean_dec_ref(x_6);
lean_dec(x_3);
lean_dec_ref(x_2);
x_77 = lean_ctor_get(x_58, 0);
lean_inc(x_77);
if (lean_is_exclusive(x_58)) {
 lean_ctor_release(x_58, 0);
 x_78 = x_58;
} else {
 lean_dec_ref(x_58);
 x_78 = lean_box(0);
}
if (lean_is_scalar(x_78)) {
 x_79 = lean_alloc_ctor(1, 1, 0);
} else {
 x_79 = x_78;
}
lean_ctor_set(x_79, 0, x_77);
return x_79;
}
}
}
else
{
lean_object* x_80; 
lean_dec(x_17);
lean_dec(x_16);
lean_dec_ref(x_6);
lean_dec(x_3);
lean_dec_ref(x_2);
x_80 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__4;
lean_ctor_set_tag(x_14, 1);
lean_ctor_set(x_14, 0, x_80);
return x_14;
}
}
else
{
lean_object* x_81; lean_object* x_82; 
x_81 = lean_ctor_get(x_14, 0);
lean_inc(x_81);
lean_dec(x_14);
x_82 = lean_ctor_get(x_81, 9);
lean_inc(x_82);
if (lean_obj_tag(x_82) == 1)
{
lean_object* x_83; lean_object* x_84; lean_object* x_85; 
x_83 = lean_ctor_get(x_82, 0);
lean_inc(x_83);
if (lean_is_exclusive(x_82)) {
 lean_ctor_release(x_82, 0);
 x_84 = x_82;
} else {
 lean_dec_ref(x_82);
 x_84 = lean_box(0);
}
x_85 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2___redArg(x_83);
if (lean_obj_tag(x_85) == 0)
{
lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; uint8_t x_90; 
x_86 = lean_ctor_get(x_85, 0);
lean_inc(x_86);
if (lean_is_exclusive(x_85)) {
 lean_ctor_release(x_85, 0);
 x_87 = x_85;
} else {
 lean_dec_ref(x_85);
 x_87 = lean_box(0);
}
x_88 = lean_ctor_get(x_86, 1);
lean_inc(x_88);
lean_dec(x_86);
x_89 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__2;
x_90 = lean_name_eq(x_88, x_89);
lean_dec(x_88);
if (x_90 == 0)
{
lean_object* x_91; lean_object* x_92; 
lean_dec(x_84);
lean_dec(x_81);
lean_dec_ref(x_6);
lean_dec(x_3);
lean_dec_ref(x_2);
x_91 = lean_box(0);
if (lean_is_scalar(x_87)) {
 x_92 = lean_alloc_ctor(0, 1, 0);
} else {
 x_92 = x_87;
}
lean_ctor_set(x_92, 0, x_91);
return x_92;
}
else
{
lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; 
lean_dec(x_87);
x_93 = lean_ctor_get(x_2, 0);
lean_inc_ref(x_93);
lean_dec_ref(x_2);
x_94 = lean_box(x_90);
x_95 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__0___boxed), 6, 4);
lean_closure_set(x_95, 0, x_93);
lean_closure_set(x_95, 1, x_3);
lean_closure_set(x_95, 2, x_81);
lean_closure_set(x_95, 3, x_94);
x_96 = l_Lean_Server_RequestM_asTask___redArg(x_95, x_6);
if (lean_obj_tag(x_96) == 0)
{
lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; 
x_97 = lean_ctor_get(x_96, 0);
lean_inc(x_97);
if (lean_is_exclusive(x_96)) {
 lean_ctor_release(x_96, 0);
 x_98 = x_96;
} else {
 lean_dec_ref(x_96);
 x_98 = lean_box(0);
}
if (lean_is_scalar(x_84)) {
 x_99 = lean_alloc_ctor(1, 1, 0);
} else {
 x_99 = x_84;
}
lean_ctor_set(x_99, 0, x_97);
if (lean_is_scalar(x_98)) {
 x_100 = lean_alloc_ctor(0, 1, 0);
} else {
 x_100 = x_98;
}
lean_ctor_set(x_100, 0, x_99);
return x_100;
}
else
{
lean_object* x_101; lean_object* x_102; lean_object* x_103; 
lean_dec(x_84);
x_101 = lean_ctor_get(x_96, 0);
lean_inc(x_101);
if (lean_is_exclusive(x_96)) {
 lean_ctor_release(x_96, 0);
 x_102 = x_96;
} else {
 lean_dec_ref(x_96);
 x_102 = lean_box(0);
}
if (lean_is_scalar(x_102)) {
 x_103 = lean_alloc_ctor(1, 1, 0);
} else {
 x_103 = x_102;
}
lean_ctor_set(x_103, 0, x_101);
return x_103;
}
}
}
else
{
lean_object* x_104; lean_object* x_105; lean_object* x_106; 
lean_dec(x_84);
lean_dec(x_81);
lean_dec_ref(x_6);
lean_dec(x_3);
lean_dec_ref(x_2);
x_104 = lean_ctor_get(x_85, 0);
lean_inc(x_104);
if (lean_is_exclusive(x_85)) {
 lean_ctor_release(x_85, 0);
 x_105 = x_85;
} else {
 lean_dec_ref(x_85);
 x_105 = lean_box(0);
}
if (lean_is_scalar(x_105)) {
 x_106 = lean_alloc_ctor(1, 1, 0);
} else {
 x_106 = x_105;
}
lean_ctor_set(x_106, 0, x_104);
return x_106;
}
}
else
{
lean_object* x_107; lean_object* x_108; 
lean_dec(x_82);
lean_dec(x_81);
lean_dec_ref(x_6);
lean_dec(x_3);
lean_dec_ref(x_2);
x_107 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__4;
x_108 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_108, 0, x_107);
return x_108;
}
}
}
else
{
uint8_t x_109; 
lean_dec_ref(x_6);
lean_dec(x_3);
lean_dec_ref(x_2);
x_109 = !lean_is_exclusive(x_14);
if (x_109 == 0)
{
return x_14;
}
else
{
lean_object* x_110; lean_object* x_111; 
x_110 = lean_ctor_get(x_14, 0);
lean_inc(x_110);
lean_dec(x_14);
x_111 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_111, 0, x_110);
return x_111;
}
}
}
}
else
{
lean_object* x_112; 
lean_dec(x_3);
x_112 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__4___redArg(x_5);
if (lean_obj_tag(x_112) == 0)
{
uint8_t x_113; 
x_113 = !lean_is_exclusive(x_112);
if (x_113 == 0)
{
lean_object* x_114; uint64_t x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; uint8_t x_119; 
x_114 = lean_ctor_get(x_112, 0);
x_115 = lean_ctor_get_uint64(x_114, sizeof(void*)*3);
x_116 = lean_ctor_get(x_114, 1);
lean_inc(x_116);
x_117 = lean_ctor_get(x_114, 2);
lean_inc(x_117);
lean_dec(x_114);
x_118 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__7;
x_119 = lean_name_eq(x_116, x_118);
lean_dec(x_116);
if (x_119 == 0)
{
lean_object* x_120; 
lean_dec(x_117);
lean_dec_ref(x_6);
lean_dec_ref(x_2);
x_120 = lean_box(0);
lean_ctor_set(x_112, 0, x_120);
return x_112;
}
else
{
lean_object* x_121; lean_object* x_122; 
x_121 = lean_ctor_get(x_2, 4);
lean_inc(x_121);
lean_dec_ref(x_2);
x_122 = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_handleRpcRelease_spec__0___redArg(x_121, x_115);
lean_dec(x_121);
if (lean_obj_tag(x_122) == 1)
{
uint8_t x_123; 
lean_free_object(x_112);
x_123 = !lean_is_exclusive(x_122);
if (x_123 == 0)
{
lean_object* x_124; lean_object* x_125; 
x_124 = lean_ctor_get(x_122, 0);
x_125 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6___redArg(x_117);
if (lean_obj_tag(x_125) == 0)
{
lean_object* x_126; lean_object* x_127; uint8_t x_128; 
x_126 = lean_ctor_get(x_125, 0);
lean_inc(x_126);
lean_dec_ref(x_125);
x_127 = l_Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest(x_1, x_126, x_6);
lean_dec_ref(x_6);
lean_dec(x_126);
x_128 = !lean_is_exclusive(x_127);
if (x_128 == 0)
{
lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; size_t x_133; size_t x_134; lean_object* x_135; uint8_t x_136; 
x_129 = lean_ctor_get(x_127, 0);
x_130 = lean_st_ref_take(x_124);
x_131 = lean_ctor_get(x_130, 0);
lean_inc_ref(x_131);
x_132 = lean_ctor_get(x_130, 1);
lean_inc(x_132);
lean_dec(x_130);
x_133 = lean_array_size(x_129);
x_134 = 0;
x_135 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__19(x_133, x_134, x_129, x_131);
x_136 = !lean_is_exclusive(x_135);
if (x_136 == 0)
{
lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; 
x_137 = lean_ctor_get(x_135, 0);
x_138 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__1___boxed), 1, 0);
x_139 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__2), 2, 1);
lean_closure_set(x_139, 0, x_132);
x_140 = l_Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14(x_137);
lean_ctor_set(x_135, 0, x_140);
x_141 = l_Prod_map___redArg(x_138, x_139, x_135);
x_142 = lean_ctor_get(x_141, 0);
lean_inc(x_142);
x_143 = lean_ctor_get(x_141, 1);
lean_inc(x_143);
lean_dec_ref(x_141);
x_144 = lean_st_ref_set(x_124, x_143);
lean_dec(x_124);
lean_inc(x_142);
lean_ctor_set(x_122, 0, x_142);
x_145 = l_Lean_Json_compress(x_142);
x_146 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_146, 0, x_122);
lean_ctor_set(x_146, 1, x_145);
lean_ctor_set_uint8(x_146, sizeof(void*)*2, x_119);
x_147 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_147, 0, x_146);
x_148 = lean_task_pure(x_147);
x_149 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_149, 0, x_148);
lean_ctor_set(x_127, 0, x_149);
return x_127;
}
else
{
lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; 
x_150 = lean_ctor_get(x_135, 0);
x_151 = lean_ctor_get(x_135, 1);
lean_inc(x_151);
lean_inc(x_150);
lean_dec(x_135);
x_152 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__1___boxed), 1, 0);
x_153 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__2), 2, 1);
lean_closure_set(x_153, 0, x_132);
x_154 = l_Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14(x_150);
x_155 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_155, 0, x_154);
lean_ctor_set(x_155, 1, x_151);
x_156 = l_Prod_map___redArg(x_152, x_153, x_155);
x_157 = lean_ctor_get(x_156, 0);
lean_inc(x_157);
x_158 = lean_ctor_get(x_156, 1);
lean_inc(x_158);
lean_dec_ref(x_156);
x_159 = lean_st_ref_set(x_124, x_158);
lean_dec(x_124);
lean_inc(x_157);
lean_ctor_set(x_122, 0, x_157);
x_160 = l_Lean_Json_compress(x_157);
x_161 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_161, 0, x_122);
lean_ctor_set(x_161, 1, x_160);
lean_ctor_set_uint8(x_161, sizeof(void*)*2, x_119);
x_162 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_162, 0, x_161);
x_163 = lean_task_pure(x_162);
x_164 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_164, 0, x_163);
lean_ctor_set(x_127, 0, x_164);
return x_127;
}
}
else
{
lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; size_t x_169; size_t x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; 
x_165 = lean_ctor_get(x_127, 0);
lean_inc(x_165);
lean_dec(x_127);
x_166 = lean_st_ref_take(x_124);
x_167 = lean_ctor_get(x_166, 0);
lean_inc_ref(x_167);
x_168 = lean_ctor_get(x_166, 1);
lean_inc(x_168);
lean_dec(x_166);
x_169 = lean_array_size(x_165);
x_170 = 0;
x_171 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__19(x_169, x_170, x_165, x_167);
x_172 = lean_ctor_get(x_171, 0);
lean_inc(x_172);
x_173 = lean_ctor_get(x_171, 1);
lean_inc(x_173);
if (lean_is_exclusive(x_171)) {
 lean_ctor_release(x_171, 0);
 lean_ctor_release(x_171, 1);
 x_174 = x_171;
} else {
 lean_dec_ref(x_171);
 x_174 = lean_box(0);
}
x_175 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__1___boxed), 1, 0);
x_176 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__2), 2, 1);
lean_closure_set(x_176, 0, x_168);
x_177 = l_Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14(x_172);
if (lean_is_scalar(x_174)) {
 x_178 = lean_alloc_ctor(0, 2, 0);
} else {
 x_178 = x_174;
}
lean_ctor_set(x_178, 0, x_177);
lean_ctor_set(x_178, 1, x_173);
x_179 = l_Prod_map___redArg(x_175, x_176, x_178);
x_180 = lean_ctor_get(x_179, 0);
lean_inc(x_180);
x_181 = lean_ctor_get(x_179, 1);
lean_inc(x_181);
lean_dec_ref(x_179);
x_182 = lean_st_ref_set(x_124, x_181);
lean_dec(x_124);
lean_inc(x_180);
lean_ctor_set(x_122, 0, x_180);
x_183 = l_Lean_Json_compress(x_180);
x_184 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_184, 0, x_122);
lean_ctor_set(x_184, 1, x_183);
lean_ctor_set_uint8(x_184, sizeof(void*)*2, x_119);
x_185 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_185, 0, x_184);
x_186 = lean_task_pure(x_185);
x_187 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_187, 0, x_186);
x_188 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_188, 0, x_187);
return x_188;
}
}
else
{
uint8_t x_189; 
lean_free_object(x_122);
lean_dec(x_124);
lean_dec_ref(x_6);
x_189 = !lean_is_exclusive(x_125);
if (x_189 == 0)
{
return x_125;
}
else
{
lean_object* x_190; lean_object* x_191; 
x_190 = lean_ctor_get(x_125, 0);
lean_inc(x_190);
lean_dec(x_125);
x_191 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_191, 0, x_190);
return x_191;
}
}
}
else
{
lean_object* x_192; lean_object* x_193; 
x_192 = lean_ctor_get(x_122, 0);
lean_inc(x_192);
lean_dec(x_122);
x_193 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6___redArg(x_117);
if (lean_obj_tag(x_193) == 0)
{
lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; size_t x_201; size_t x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; lean_object* x_221; 
x_194 = lean_ctor_get(x_193, 0);
lean_inc(x_194);
lean_dec_ref(x_193);
x_195 = l_Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest(x_1, x_194, x_6);
lean_dec_ref(x_6);
lean_dec(x_194);
x_196 = lean_ctor_get(x_195, 0);
lean_inc(x_196);
if (lean_is_exclusive(x_195)) {
 lean_ctor_release(x_195, 0);
 x_197 = x_195;
} else {
 lean_dec_ref(x_195);
 x_197 = lean_box(0);
}
x_198 = lean_st_ref_take(x_192);
x_199 = lean_ctor_get(x_198, 0);
lean_inc_ref(x_199);
x_200 = lean_ctor_get(x_198, 1);
lean_inc(x_200);
lean_dec(x_198);
x_201 = lean_array_size(x_196);
x_202 = 0;
x_203 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__19(x_201, x_202, x_196, x_199);
x_204 = lean_ctor_get(x_203, 0);
lean_inc(x_204);
x_205 = lean_ctor_get(x_203, 1);
lean_inc(x_205);
if (lean_is_exclusive(x_203)) {
 lean_ctor_release(x_203, 0);
 lean_ctor_release(x_203, 1);
 x_206 = x_203;
} else {
 lean_dec_ref(x_203);
 x_206 = lean_box(0);
}
x_207 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__1___boxed), 1, 0);
x_208 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__2), 2, 1);
lean_closure_set(x_208, 0, x_200);
x_209 = l_Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14(x_204);
if (lean_is_scalar(x_206)) {
 x_210 = lean_alloc_ctor(0, 2, 0);
} else {
 x_210 = x_206;
}
lean_ctor_set(x_210, 0, x_209);
lean_ctor_set(x_210, 1, x_205);
x_211 = l_Prod_map___redArg(x_207, x_208, x_210);
x_212 = lean_ctor_get(x_211, 0);
lean_inc(x_212);
x_213 = lean_ctor_get(x_211, 1);
lean_inc(x_213);
lean_dec_ref(x_211);
x_214 = lean_st_ref_set(x_192, x_213);
lean_dec(x_192);
lean_inc(x_212);
x_215 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_215, 0, x_212);
x_216 = l_Lean_Json_compress(x_212);
x_217 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_217, 0, x_215);
lean_ctor_set(x_217, 1, x_216);
lean_ctor_set_uint8(x_217, sizeof(void*)*2, x_119);
x_218 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_218, 0, x_217);
x_219 = lean_task_pure(x_218);
x_220 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_220, 0, x_219);
if (lean_is_scalar(x_197)) {
 x_221 = lean_alloc_ctor(0, 1, 0);
} else {
 x_221 = x_197;
}
lean_ctor_set(x_221, 0, x_220);
return x_221;
}
else
{
lean_object* x_222; lean_object* x_223; lean_object* x_224; 
lean_dec(x_192);
lean_dec_ref(x_6);
x_222 = lean_ctor_get(x_193, 0);
lean_inc(x_222);
if (lean_is_exclusive(x_193)) {
 lean_ctor_release(x_193, 0);
 x_223 = x_193;
} else {
 lean_dec_ref(x_193);
 x_223 = lean_box(0);
}
if (lean_is_scalar(x_223)) {
 x_224 = lean_alloc_ctor(1, 1, 0);
} else {
 x_224 = x_223;
}
lean_ctor_set(x_224, 0, x_222);
return x_224;
}
}
}
else
{
lean_object* x_225; 
lean_dec(x_122);
lean_dec(x_117);
lean_dec_ref(x_6);
x_225 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__8;
lean_ctor_set_tag(x_112, 1);
lean_ctor_set(x_112, 0, x_225);
return x_112;
}
}
}
else
{
lean_object* x_226; uint64_t x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; uint8_t x_231; 
x_226 = lean_ctor_get(x_112, 0);
lean_inc(x_226);
lean_dec(x_112);
x_227 = lean_ctor_get_uint64(x_226, sizeof(void*)*3);
x_228 = lean_ctor_get(x_226, 1);
lean_inc(x_228);
x_229 = lean_ctor_get(x_226, 2);
lean_inc(x_229);
lean_dec(x_226);
x_230 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__7;
x_231 = lean_name_eq(x_228, x_230);
lean_dec(x_228);
if (x_231 == 0)
{
lean_object* x_232; lean_object* x_233; 
lean_dec(x_229);
lean_dec_ref(x_6);
lean_dec_ref(x_2);
x_232 = lean_box(0);
x_233 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_233, 0, x_232);
return x_233;
}
else
{
lean_object* x_234; lean_object* x_235; 
x_234 = lean_ctor_get(x_2, 4);
lean_inc(x_234);
lean_dec_ref(x_2);
x_235 = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_Server_FileWorker_handleRpcRelease_spec__0___redArg(x_234, x_227);
lean_dec(x_234);
if (lean_obj_tag(x_235) == 1)
{
lean_object* x_236; lean_object* x_237; lean_object* x_238; 
x_236 = lean_ctor_get(x_235, 0);
lean_inc(x_236);
if (lean_is_exclusive(x_235)) {
 lean_ctor_release(x_235, 0);
 x_237 = x_235;
} else {
 lean_dec_ref(x_235);
 x_237 = lean_box(0);
}
x_238 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6___redArg(x_229);
if (lean_obj_tag(x_238) == 0)
{
lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; size_t x_246; size_t x_247; lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264; lean_object* x_265; lean_object* x_266; 
x_239 = lean_ctor_get(x_238, 0);
lean_inc(x_239);
lean_dec_ref(x_238);
x_240 = l_Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest(x_1, x_239, x_6);
lean_dec_ref(x_6);
lean_dec(x_239);
x_241 = lean_ctor_get(x_240, 0);
lean_inc(x_241);
if (lean_is_exclusive(x_240)) {
 lean_ctor_release(x_240, 0);
 x_242 = x_240;
} else {
 lean_dec_ref(x_240);
 x_242 = lean_box(0);
}
x_243 = lean_st_ref_take(x_236);
x_244 = lean_ctor_get(x_243, 0);
lean_inc_ref(x_244);
x_245 = lean_ctor_get(x_243, 1);
lean_inc(x_245);
lean_dec(x_243);
x_246 = lean_array_size(x_241);
x_247 = 0;
x_248 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__19(x_246, x_247, x_241, x_244);
x_249 = lean_ctor_get(x_248, 0);
lean_inc(x_249);
x_250 = lean_ctor_get(x_248, 1);
lean_inc(x_250);
if (lean_is_exclusive(x_248)) {
 lean_ctor_release(x_248, 0);
 lean_ctor_release(x_248, 1);
 x_251 = x_248;
} else {
 lean_dec_ref(x_248);
 x_251 = lean_box(0);
}
x_252 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__1___boxed), 1, 0);
x_253 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___lam__2), 2, 1);
lean_closure_set(x_253, 0, x_245);
x_254 = l_Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14(x_249);
if (lean_is_scalar(x_251)) {
 x_255 = lean_alloc_ctor(0, 2, 0);
} else {
 x_255 = x_251;
}
lean_ctor_set(x_255, 0, x_254);
lean_ctor_set(x_255, 1, x_250);
x_256 = l_Prod_map___redArg(x_252, x_253, x_255);
x_257 = lean_ctor_get(x_256, 0);
lean_inc(x_257);
x_258 = lean_ctor_get(x_256, 1);
lean_inc(x_258);
lean_dec_ref(x_256);
x_259 = lean_st_ref_set(x_236, x_258);
lean_dec(x_236);
lean_inc(x_257);
if (lean_is_scalar(x_237)) {
 x_260 = lean_alloc_ctor(1, 1, 0);
} else {
 x_260 = x_237;
}
lean_ctor_set(x_260, 0, x_257);
x_261 = l_Lean_Json_compress(x_257);
x_262 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_262, 0, x_260);
lean_ctor_set(x_262, 1, x_261);
lean_ctor_set_uint8(x_262, sizeof(void*)*2, x_231);
x_263 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_263, 0, x_262);
x_264 = lean_task_pure(x_263);
x_265 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_265, 0, x_264);
if (lean_is_scalar(x_242)) {
 x_266 = lean_alloc_ctor(0, 1, 0);
} else {
 x_266 = x_242;
}
lean_ctor_set(x_266, 0, x_265);
return x_266;
}
else
{
lean_object* x_267; lean_object* x_268; lean_object* x_269; 
lean_dec(x_237);
lean_dec(x_236);
lean_dec_ref(x_6);
x_267 = lean_ctor_get(x_238, 0);
lean_inc(x_267);
if (lean_is_exclusive(x_238)) {
 lean_ctor_release(x_238, 0);
 x_268 = x_238;
} else {
 lean_dec_ref(x_238);
 x_268 = lean_box(0);
}
if (lean_is_scalar(x_268)) {
 x_269 = lean_alloc_ctor(1, 1, 0);
} else {
 x_269 = x_268;
}
lean_ctor_set(x_269, 0, x_267);
return x_269;
}
}
else
{
lean_object* x_270; lean_object* x_271; 
lean_dec(x_235);
lean_dec(x_229);
lean_dec_ref(x_6);
x_270 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__8;
x_271 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_271, 0, x_270);
return x_271;
}
}
}
}
else
{
uint8_t x_272; 
lean_dec_ref(x_6);
lean_dec_ref(x_2);
x_272 = !lean_is_exclusive(x_112);
if (x_272 == 0)
{
return x_112;
}
else
{
lean_object* x_273; lean_object* x_274; 
x_273 = lean_ctor_get(x_112, 0);
lean_inc(x_273);
lean_dec(x_112);
x_274 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_274, 0, x_273);
return x_274;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0(x_1, x_2);
lean_dec_ref(x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2(x_1, x_2);
lean_dec_ref(x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__4(x_1, x_2);
lean_dec_ref(x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6(x_1, x_2);
lean_dec_ref(x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8_spec__8___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
size_t x_8; size_t x_9; lean_object* x_10; 
x_8 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_9 = lean_unbox_usize(x_5);
lean_dec(x_5);
x_10 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8_spec__8(x_1, x_2, x_3, x_8, x_9, x_6, x_7);
return x_10;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0___redArg(x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__2___redArg(x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__4___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__4___redArg(x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__6___redArg(x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14_spec__14___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
size_t x_4; size_t x_5; lean_object* x_6; 
x_4 = lean_unbox_usize(x_1);
lean_dec(x_1);
x_5 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_6 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__14_spec__14(x_4, x_5, x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10_spec__10_spec__10___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
size_t x_4; size_t x_5; lean_object* x_6; 
x_4 = lean_unbox_usize(x_1);
lean_dec(x_1);
x_5 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_6 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10_spec__10_spec__10(x_4, x_5, x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__13___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
size_t x_5; size_t x_6; lean_object* x_7; 
x_5 = lean_unbox_usize(x_1);
lean_dec(x_1);
x_6 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_7 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__13(x_5, x_6, x_3, x_4);
return x_7;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__19___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
size_t x_5; size_t x_6; lean_object* x_7; 
x_5 = lean_unbox_usize(x_1);
lean_dec(x_1);
x_6 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_7 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__19(x_5, x_6, x_3, x_4);
return x_7;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8_spec__8___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
size_t x_6; size_t x_7; lean_object* x_8; 
x_6 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_7 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_8 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_TaggedText_mapM___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__8_spec__8___redArg(x_1, x_6, x_7, x_4, x_5);
return x_8;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
size_t x_5; size_t x_6; lean_object* x_7; 
x_5 = lean_unbox_usize(x_1);
lean_dec(x_1);
x_6 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_7 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16(x_5, x_6, x_3, x_4);
return x_7;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__17___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
size_t x_5; size_t x_6; lean_object* x_7; 
x_5 = lean_unbox_usize(x_1);
lean_dec(x_1);
x_6 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_7 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__17(x_5, x_6, x_3, x_4);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec_ref(x_4);
lean_dec_ref(x_1);
return x_8;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__2_spec__2(size_t x_1, size_t x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; 
x_4 = lean_usize_dec_lt(x_2, x_1);
if (x_4 == 0)
{
return x_3;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; size_t x_9; size_t x_10; lean_object* x_11; 
x_5 = lean_array_uget(x_3, x_2);
x_6 = lean_unsigned_to_nat(0u);
x_7 = lean_array_uset(x_3, x_2, x_6);
x_8 = l_Lean_Lsp_instToJsonCodeAction_toJson(x_5);
x_9 = 1;
x_10 = lean_usize_add(x_2, x_9);
x_11 = lean_array_uset(x_7, x_2, x_8);
x_2 = x_10;
x_3 = x_11;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l_Array_toJson___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__2(lean_object* x_1) {
_start:
{
size_t x_2; size_t x_3; lean_object* x_4; lean_object* x_5; 
x_2 = lean_array_size(x_1);
x_3 = 0;
x_4 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__2_spec__2(x_2, x_3, x_1);
x_5 = lean_alloc_ctor(4, 1, 0);
lean_ctor_set(x_5, 0, x_4);
return x_5;
}
}
LEAN_EXPORT uint8_t l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Array_contains___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__4_spec__4(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4) {
_start:
{
uint8_t x_5; 
x_5 = lean_usize_dec_eq(x_3, x_4);
if (x_5 == 0)
{
lean_object* x_6; uint8_t x_7; 
x_6 = lean_array_uget(x_2, x_3);
x_7 = lean_string_dec_eq(x_1, x_6);
lean_dec(x_6);
if (x_7 == 0)
{
size_t x_8; size_t x_9; 
x_8 = 1;
x_9 = lean_usize_add(x_3, x_8);
x_3 = x_9;
goto _start;
}
else
{
return x_7;
}
}
else
{
uint8_t x_11; 
x_11 = 0;
return x_11;
}
}
}
LEAN_EXPORT uint8_t l_Array_contains___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__4(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; uint8_t x_5; 
x_3 = lean_unsigned_to_nat(0u);
x_4 = lean_array_get_size(x_1);
x_5 = lean_nat_dec_lt(x_3, x_4);
if (x_5 == 0)
{
lean_dec(x_4);
return x_5;
}
else
{
if (x_5 == 0)
{
lean_dec(x_4);
return x_5;
}
else
{
size_t x_6; size_t x_7; uint8_t x_8; 
x_6 = 0;
x_7 = lean_usize_of_nat(x_4);
lean_dec(x_4);
x_8 = l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Array_contains___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__4_spec__4(x_2, x_1, x_6, x_7);
return x_8;
}
}
}
}
static lean_object* _init_l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("expected JSON array, got '", 26, 26);
return x_1;
}
}
static lean_object* _init_l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("'", 1, 1);
return x_1;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0_spec__0(size_t x_1, size_t x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; 
x_4 = lean_usize_dec_lt(x_2, x_1);
if (x_4 == 0)
{
lean_object* x_5; 
x_5 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_5, 0, x_3);
return x_5;
}
else
{
lean_object* x_6; lean_object* x_7; 
x_6 = lean_array_uget(x_3, x_2);
x_7 = l_Lean_Lsp_instFromJsonCodeAction_fromJson(x_6);
if (lean_obj_tag(x_7) == 0)
{
uint8_t x_8; 
lean_dec_ref(x_3);
x_8 = !lean_is_exclusive(x_7);
if (x_8 == 0)
{
return x_7;
}
else
{
lean_object* x_9; lean_object* x_10; 
x_9 = lean_ctor_get(x_7, 0);
lean_inc(x_9);
lean_dec(x_7);
x_10 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_10, 0, x_9);
return x_10;
}
}
else
{
lean_object* x_11; lean_object* x_12; lean_object* x_13; size_t x_14; size_t x_15; lean_object* x_16; 
x_11 = lean_ctor_get(x_7, 0);
lean_inc(x_11);
lean_dec_ref(x_7);
x_12 = lean_unsigned_to_nat(0u);
x_13 = lean_array_uset(x_3, x_2, x_12);
x_14 = 1;
x_15 = lean_usize_add(x_2, x_14);
x_16 = lean_array_uset(x_13, x_2, x_11);
x_2 = x_15;
x_3 = x_16;
goto _start;
}
}
}
}
LEAN_EXPORT lean_object* l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 4)
{
lean_object* x_2; size_t x_3; size_t x_4; lean_object* x_5; 
x_2 = lean_ctor_get(x_1, 0);
lean_inc_ref(x_2);
lean_dec_ref(x_1);
x_3 = lean_array_size(x_2);
x_4 = 0;
x_5 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0_spec__0(x_3, x_4, x_2);
return x_5;
}
else
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_6 = l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__0;
x_7 = lean_unsigned_to_nat(80u);
x_8 = l_Lean_Json_pretty(x_1, x_7);
x_9 = lean_string_append(x_6, x_8);
lean_dec_ref(x_8);
x_10 = l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__1;
x_11 = lean_string_append(x_9, x_10);
x_12 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_12, 0, x_11);
return x_12;
}
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("refactor", 8, 8);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("quickfix", 8, 8);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("source.organizeImports", 22, 22);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__3() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("source", 6, 6);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_7; 
x_7 = lean_ctor_get(x_4, 0);
lean_inc(x_7);
if (lean_obj_tag(x_7) == 1)
{
uint8_t x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_70; lean_object* x_71; uint8_t x_85; lean_object* x_121; 
x_8 = lean_ctor_get_uint8(x_4, sizeof(void*)*2);
x_9 = lean_ctor_get(x_7, 0);
lean_inc(x_9);
if (lean_is_exclusive(x_7)) {
 lean_ctor_release(x_7, 0);
 x_10 = x_7;
} else {
 lean_dec_ref(x_7);
 x_10 = lean_box(0);
}
x_70 = lean_ctor_get(x_1, 3);
x_71 = lean_ctor_get(x_1, 4);
x_121 = lean_ctor_get(x_71, 1);
if (lean_obj_tag(x_121) == 0)
{
goto block_84;
}
else
{
lean_object* x_122; lean_object* x_123; uint8_t x_124; 
x_122 = lean_ctor_get(x_121, 0);
x_123 = l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__3;
x_124 = l_Array_contains___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__4(x_122, x_123);
if (x_124 == 0)
{
lean_object* x_125; uint8_t x_126; 
x_125 = l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__2;
x_126 = l_Array_contains___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__4(x_122, x_125);
x_85 = x_126;
goto block_120;
}
else
{
x_85 = x_124;
goto block_120;
}
}
block_69:
{
lean_object* x_14; 
x_14 = l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0(x_9);
if (lean_obj_tag(x_14) == 1)
{
uint8_t x_15; 
x_15 = !lean_is_exclusive(x_4);
if (x_15 == 0)
{
lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; 
x_16 = lean_ctor_get(x_4, 1);
lean_dec(x_16);
x_17 = lean_ctor_get(x_4, 0);
lean_dec(x_17);
x_18 = lean_ctor_get(x_14, 0);
lean_inc(x_18);
lean_dec_ref(x_14);
x_19 = l_Lean_Server_RequestM_checkCancelled(x_5);
if (lean_obj_tag(x_19) == 0)
{
uint32_t x_20; lean_object* x_21; lean_object* x_22; 
lean_dec_ref(x_19);
x_20 = 1000;
x_21 = l_IO_sleep(x_20);
x_22 = l_Lean_Server_RequestM_checkCancelled(x_5);
if (lean_obj_tag(x_22) == 0)
{
lean_object* x_23; 
lean_dec_ref(x_22);
x_23 = l_Lean_Server_FileWorker_handleUnknownIdentifierCodeAction(x_2, x_1, x_12, x_13, x_5);
if (lean_obj_tag(x_23) == 0)
{
uint8_t x_24; 
x_24 = !lean_is_exclusive(x_23);
if (x_24 == 0)
{
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; 
x_25 = lean_ctor_get(x_23, 0);
x_26 = l_Array_append___redArg(x_18, x_25);
lean_dec(x_25);
x_27 = l_Array_toJson___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__2(x_26);
lean_inc(x_27);
if (lean_is_scalar(x_10)) {
 x_28 = lean_alloc_ctor(1, 1, 0);
} else {
 x_28 = x_10;
}
lean_ctor_set(x_28, 0, x_27);
x_29 = l_Lean_Json_compress(x_27);
lean_ctor_set(x_4, 1, x_29);
lean_ctor_set(x_4, 0, x_28);
lean_ctor_set(x_23, 0, x_4);
return x_23;
}
else
{
lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; 
x_30 = lean_ctor_get(x_23, 0);
lean_inc(x_30);
lean_dec(x_23);
x_31 = l_Array_append___redArg(x_18, x_30);
lean_dec(x_30);
x_32 = l_Array_toJson___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__2(x_31);
lean_inc(x_32);
if (lean_is_scalar(x_10)) {
 x_33 = lean_alloc_ctor(1, 1, 0);
} else {
 x_33 = x_10;
}
lean_ctor_set(x_33, 0, x_32);
x_34 = l_Lean_Json_compress(x_32);
lean_ctor_set(x_4, 1, x_34);
lean_ctor_set(x_4, 0, x_33);
x_35 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_35, 0, x_4);
return x_35;
}
}
else
{
uint8_t x_36; 
lean_dec(x_18);
lean_free_object(x_4);
lean_dec(x_10);
x_36 = !lean_is_exclusive(x_23);
if (x_36 == 0)
{
return x_23;
}
else
{
lean_object* x_37; lean_object* x_38; 
x_37 = lean_ctor_get(x_23, 0);
lean_inc(x_37);
lean_dec(x_23);
x_38 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_38, 0, x_37);
return x_38;
}
}
}
else
{
uint8_t x_39; 
lean_dec(x_18);
lean_free_object(x_4);
lean_dec_ref(x_13);
lean_dec_ref(x_12);
lean_dec(x_10);
lean_dec_ref(x_5);
lean_dec(x_2);
lean_dec_ref(x_1);
x_39 = !lean_is_exclusive(x_22);
if (x_39 == 0)
{
return x_22;
}
else
{
lean_object* x_40; lean_object* x_41; 
x_40 = lean_ctor_get(x_22, 0);
lean_inc(x_40);
lean_dec(x_22);
x_41 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_41, 0, x_40);
return x_41;
}
}
}
else
{
uint8_t x_42; 
lean_dec(x_18);
lean_free_object(x_4);
lean_dec_ref(x_13);
lean_dec_ref(x_12);
lean_dec(x_10);
lean_dec_ref(x_5);
lean_dec(x_2);
lean_dec_ref(x_1);
x_42 = !lean_is_exclusive(x_19);
if (x_42 == 0)
{
return x_19;
}
else
{
lean_object* x_43; lean_object* x_44; 
x_43 = lean_ctor_get(x_19, 0);
lean_inc(x_43);
lean_dec(x_19);
x_44 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_44, 0, x_43);
return x_44;
}
}
}
else
{
lean_object* x_45; lean_object* x_46; 
lean_dec(x_4);
x_45 = lean_ctor_get(x_14, 0);
lean_inc(x_45);
lean_dec_ref(x_14);
x_46 = l_Lean_Server_RequestM_checkCancelled(x_5);
if (lean_obj_tag(x_46) == 0)
{
uint32_t x_47; lean_object* x_48; lean_object* x_49; 
lean_dec_ref(x_46);
x_47 = 1000;
x_48 = l_IO_sleep(x_47);
x_49 = l_Lean_Server_RequestM_checkCancelled(x_5);
if (lean_obj_tag(x_49) == 0)
{
lean_object* x_50; 
lean_dec_ref(x_49);
x_50 = l_Lean_Server_FileWorker_handleUnknownIdentifierCodeAction(x_2, x_1, x_12, x_13, x_5);
if (lean_obj_tag(x_50) == 0)
{
lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; 
x_51 = lean_ctor_get(x_50, 0);
lean_inc(x_51);
if (lean_is_exclusive(x_50)) {
 lean_ctor_release(x_50, 0);
 x_52 = x_50;
} else {
 lean_dec_ref(x_50);
 x_52 = lean_box(0);
}
x_53 = l_Array_append___redArg(x_45, x_51);
lean_dec(x_51);
x_54 = l_Array_toJson___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__2(x_53);
lean_inc(x_54);
if (lean_is_scalar(x_10)) {
 x_55 = lean_alloc_ctor(1, 1, 0);
} else {
 x_55 = x_10;
}
lean_ctor_set(x_55, 0, x_54);
x_56 = l_Lean_Json_compress(x_54);
x_57 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_57, 0, x_55);
lean_ctor_set(x_57, 1, x_56);
lean_ctor_set_uint8(x_57, sizeof(void*)*2, x_8);
if (lean_is_scalar(x_52)) {
 x_58 = lean_alloc_ctor(0, 1, 0);
} else {
 x_58 = x_52;
}
lean_ctor_set(x_58, 0, x_57);
return x_58;
}
else
{
lean_object* x_59; lean_object* x_60; lean_object* x_61; 
lean_dec(x_45);
lean_dec(x_10);
x_59 = lean_ctor_get(x_50, 0);
lean_inc(x_59);
if (lean_is_exclusive(x_50)) {
 lean_ctor_release(x_50, 0);
 x_60 = x_50;
} else {
 lean_dec_ref(x_50);
 x_60 = lean_box(0);
}
if (lean_is_scalar(x_60)) {
 x_61 = lean_alloc_ctor(1, 1, 0);
} else {
 x_61 = x_60;
}
lean_ctor_set(x_61, 0, x_59);
return x_61;
}
}
else
{
lean_object* x_62; lean_object* x_63; lean_object* x_64; 
lean_dec(x_45);
lean_dec_ref(x_13);
lean_dec_ref(x_12);
lean_dec(x_10);
lean_dec_ref(x_5);
lean_dec(x_2);
lean_dec_ref(x_1);
x_62 = lean_ctor_get(x_49, 0);
lean_inc(x_62);
if (lean_is_exclusive(x_49)) {
 lean_ctor_release(x_49, 0);
 x_63 = x_49;
} else {
 lean_dec_ref(x_49);
 x_63 = lean_box(0);
}
if (lean_is_scalar(x_63)) {
 x_64 = lean_alloc_ctor(1, 1, 0);
} else {
 x_64 = x_63;
}
lean_ctor_set(x_64, 0, x_62);
return x_64;
}
}
else
{
lean_object* x_65; lean_object* x_66; lean_object* x_67; 
lean_dec(x_45);
lean_dec_ref(x_13);
lean_dec_ref(x_12);
lean_dec(x_10);
lean_dec_ref(x_5);
lean_dec(x_2);
lean_dec_ref(x_1);
x_65 = lean_ctor_get(x_46, 0);
lean_inc(x_65);
if (lean_is_exclusive(x_46)) {
 lean_ctor_release(x_46, 0);
 x_66 = x_46;
} else {
 lean_dec_ref(x_46);
 x_66 = lean_box(0);
}
if (lean_is_scalar(x_66)) {
 x_67 = lean_alloc_ctor(1, 1, 0);
} else {
 x_67 = x_66;
}
lean_ctor_set(x_67, 0, x_65);
return x_67;
}
}
}
else
{
lean_object* x_68; 
lean_dec_ref(x_14);
lean_dec_ref(x_13);
lean_dec_ref(x_12);
lean_dec(x_10);
lean_dec_ref(x_5);
lean_dec(x_2);
lean_dec_ref(x_1);
x_68 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_68, 0, x_4);
return x_68;
}
}
block_84:
{
lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; uint8_t x_79; 
x_72 = lean_ctor_get(x_3, 0);
x_73 = lean_ctor_get(x_72, 0);
x_74 = lean_ctor_get(x_73, 3);
lean_inc_ref(x_70);
x_75 = l_Lean_FileMap_lspRangeToUtf8Range(x_74, x_70);
lean_inc_ref(x_75);
x_76 = l_Lean_Server_FileWorker_waitUnknownIdentifierRanges(x_3, x_75);
x_77 = lean_ctor_get(x_76, 0);
lean_inc(x_77);
x_78 = lean_ctor_get(x_76, 1);
lean_inc(x_78);
lean_dec_ref(x_76);
x_79 = l_Array_isEmpty___redArg(x_77);
lean_dec(x_77);
if (x_79 == 0)
{
uint8_t x_80; 
x_80 = lean_unbox(x_78);
lean_dec(x_78);
if (x_80 == 0)
{
lean_object* x_81; 
x_81 = l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__0;
x_11 = lean_box(0);
x_12 = x_75;
x_13 = x_81;
goto block_69;
}
else
{
lean_object* x_82; 
x_82 = l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__1;
x_11 = lean_box(0);
x_12 = x_75;
x_13 = x_82;
goto block_69;
}
}
else
{
lean_object* x_83; 
lean_dec(x_78);
lean_dec_ref(x_75);
lean_dec(x_10);
lean_dec(x_9);
lean_dec_ref(x_5);
lean_dec(x_2);
lean_dec_ref(x_1);
x_83 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_83, 0, x_4);
return x_83;
}
}
block_120:
{
if (x_85 == 0)
{
goto block_84;
}
else
{
lean_object* x_86; uint8_t x_87; 
lean_dec(x_10);
lean_dec_ref(x_5);
lean_dec(x_2);
x_86 = l_Lean_Server_FileWorker_waitAllUnknownIdentifierMessageRanges(x_3);
x_87 = l_Array_isEmpty___redArg(x_86);
lean_dec_ref(x_86);
if (x_87 == 0)
{
lean_object* x_88; 
x_88 = l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0(x_9);
if (lean_obj_tag(x_88) == 1)
{
uint8_t x_89; 
x_89 = !lean_is_exclusive(x_4);
if (x_89 == 0)
{
lean_object* x_90; lean_object* x_91; uint8_t x_92; 
x_90 = lean_ctor_get(x_4, 1);
lean_dec(x_90);
x_91 = lean_ctor_get(x_4, 0);
lean_dec(x_91);
x_92 = !lean_is_exclusive(x_88);
if (x_92 == 0)
{
lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; 
x_93 = lean_ctor_get(x_88, 0);
x_94 = l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__2;
x_95 = l_Lean_Server_FileWorker_importAllUnknownIdentifiersCodeAction(x_1, x_94);
x_96 = lean_array_push(x_93, x_95);
x_97 = l_Array_toJson___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__2(x_96);
lean_inc(x_97);
lean_ctor_set(x_88, 0, x_97);
x_98 = l_Lean_Json_compress(x_97);
lean_ctor_set(x_4, 1, x_98);
lean_ctor_set(x_4, 0, x_88);
x_99 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_99, 0, x_4);
return x_99;
}
else
{
lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; 
x_100 = lean_ctor_get(x_88, 0);
lean_inc(x_100);
lean_dec(x_88);
x_101 = l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__2;
x_102 = l_Lean_Server_FileWorker_importAllUnknownIdentifiersCodeAction(x_1, x_101);
x_103 = lean_array_push(x_100, x_102);
x_104 = l_Array_toJson___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__2(x_103);
lean_inc(x_104);
x_105 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_105, 0, x_104);
x_106 = l_Lean_Json_compress(x_104);
lean_ctor_set(x_4, 1, x_106);
lean_ctor_set(x_4, 0, x_105);
x_107 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_107, 0, x_4);
return x_107;
}
}
else
{
lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; 
lean_dec(x_4);
x_108 = lean_ctor_get(x_88, 0);
lean_inc(x_108);
if (lean_is_exclusive(x_88)) {
 lean_ctor_release(x_88, 0);
 x_109 = x_88;
} else {
 lean_dec_ref(x_88);
 x_109 = lean_box(0);
}
x_110 = l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__2;
x_111 = l_Lean_Server_FileWorker_importAllUnknownIdentifiersCodeAction(x_1, x_110);
x_112 = lean_array_push(x_108, x_111);
x_113 = l_Array_toJson___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__2(x_112);
lean_inc(x_113);
if (lean_is_scalar(x_109)) {
 x_114 = lean_alloc_ctor(1, 1, 0);
} else {
 x_114 = x_109;
}
lean_ctor_set(x_114, 0, x_113);
x_115 = l_Lean_Json_compress(x_113);
x_116 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_116, 0, x_114);
lean_ctor_set(x_116, 1, x_115);
lean_ctor_set_uint8(x_116, sizeof(void*)*2, x_8);
x_117 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_117, 0, x_116);
return x_117;
}
}
else
{
lean_object* x_118; 
lean_dec_ref(x_88);
lean_dec_ref(x_1);
x_118 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_118, 0, x_4);
return x_118;
}
}
else
{
lean_object* x_119; 
lean_dec(x_9);
lean_dec_ref(x_1);
x_119 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_119, 0, x_4);
return x_119;
}
}
}
}
else
{
lean_object* x_127; 
lean_dec(x_7);
lean_dec_ref(x_5);
lean_dec_ref(x_3);
lean_dec(x_2);
lean_dec_ref(x_1);
x_127 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_127, 0, x_4);
return x_127;
}
}
}
static lean_object* _init_l_Lean_Server_FileWorker_handlePostRequestSpecialCases___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("textDocument/codeAction", 23, 23);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0(x_1, x_2, x_3, x_4, x_5);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePostRequestSpecialCases(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_7; uint8_t x_8; 
x_7 = l_Lean_Server_RequestM_readDoc___at___00Lean_Server_FileWorker_handleGetInteractiveDiagnosticsRequest_spec__0(x_5);
x_8 = !lean_is_exclusive(x_7);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10; uint8_t x_11; 
x_9 = lean_ctor_get(x_7, 0);
x_10 = l_Lean_Server_FileWorker_handlePostRequestSpecialCases___closed__0;
x_11 = lean_string_dec_eq(x_2, x_10);
if (x_11 == 0)
{
lean_dec(x_9);
lean_dec_ref(x_5);
lean_dec(x_3);
lean_dec(x_1);
lean_ctor_set(x_7, 0, x_4);
return x_7;
}
else
{
lean_object* x_12; 
x_12 = l_Lean_Lsp_instFromJsonCodeActionParams_fromJson(x_3);
if (lean_obj_tag(x_12) == 1)
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; 
lean_free_object(x_7);
x_13 = lean_ctor_get(x_12, 0);
lean_inc(x_13);
lean_dec_ref(x_12);
x_14 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___boxed), 6, 3);
lean_closure_set(x_14, 0, x_13);
lean_closure_set(x_14, 1, x_1);
lean_closure_set(x_14, 2, x_9);
x_15 = l_Lean_Server_RequestM_mapRequestTaskCostly___redArg(x_4, x_14, x_5);
return x_15;
}
else
{
lean_dec_ref(x_12);
lean_dec(x_9);
lean_dec_ref(x_5);
lean_dec(x_1);
lean_ctor_set(x_7, 0, x_4);
return x_7;
}
}
}
else
{
lean_object* x_16; lean_object* x_17; uint8_t x_18; 
x_16 = lean_ctor_get(x_7, 0);
lean_inc(x_16);
lean_dec(x_7);
x_17 = l_Lean_Server_FileWorker_handlePostRequestSpecialCases___closed__0;
x_18 = lean_string_dec_eq(x_2, x_17);
if (x_18 == 0)
{
lean_object* x_19; 
lean_dec(x_16);
lean_dec_ref(x_5);
lean_dec(x_3);
lean_dec(x_1);
x_19 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_19, 0, x_4);
return x_19;
}
else
{
lean_object* x_20; 
x_20 = l_Lean_Lsp_instFromJsonCodeActionParams_fromJson(x_3);
if (lean_obj_tag(x_20) == 1)
{
lean_object* x_21; lean_object* x_22; lean_object* x_23; 
x_21 = lean_ctor_get(x_20, 0);
lean_inc(x_21);
lean_dec_ref(x_20);
x_22 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___boxed), 6, 3);
lean_closure_set(x_22, 0, x_21);
lean_closure_set(x_22, 1, x_1);
lean_closure_set(x_22, 2, x_16);
x_23 = l_Lean_Server_RequestM_mapRequestTaskCostly___redArg(x_4, x_22, x_5);
return x_23;
}
else
{
lean_object* x_24; 
lean_dec_ref(x_20);
lean_dec(x_16);
lean_dec_ref(x_5);
lean_dec(x_1);
x_24 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_24, 0, x_4);
return x_24;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Array_contains___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__4___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; lean_object* x_4; 
x_3 = l_Array_contains___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__4(x_1, x_2);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_4 = lean_box(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__2_spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
size_t x_4; size_t x_5; lean_object* x_6; 
x_4 = lean_unbox_usize(x_1);
lean_dec(x_1);
x_5 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_6 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_toJson___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__2_spec__2(x_4, x_5, x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Array_contains___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__4_spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
size_t x_5; size_t x_6; uint8_t x_7; lean_object* x_8; 
x_5 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_6 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_7 = l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Array_contains___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__4_spec__4(x_1, x_2, x_5, x_6);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_8 = lean_box(x_7);
return x_8;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
size_t x_4; size_t x_5; lean_object* x_6; 
x_4 = lean_unbox_usize(x_1);
lean_dec(x_1);
x_5 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_6 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0_spec__0(x_4, x_5, x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handlePostRequestSpecialCases___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_Server_FileWorker_handlePostRequestSpecialCases(x_1, x_2, x_3, x_4, x_5);
lean_dec_ref(x_2);
return x_7;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse___lam__0(uint8_t x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; 
x_4 = !lean_is_exclusive(x_3);
if (x_4 == 0)
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; 
x_5 = lean_ctor_get(x_3, 1);
x_6 = lean_ctor_get(x_3, 2);
lean_dec(x_6);
x_7 = lean_unsigned_to_nat(1u);
x_8 = lean_nat_sub(x_5, x_7);
lean_dec(x_5);
if (x_1 == 0)
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; 
x_9 = lean_unsigned_to_nat(0u);
x_10 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_10, 0, x_2);
lean_ctor_set(x_10, 1, x_9);
x_11 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_11, 0, x_10);
lean_ctor_set(x_3, 2, x_11);
lean_ctor_set(x_3, 1, x_8);
return x_3;
}
else
{
lean_object* x_12; 
lean_dec(x_2);
x_12 = lean_box(0);
lean_ctor_set(x_3, 2, x_12);
lean_ctor_set(x_3, 1, x_8);
return x_3;
}
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; 
x_13 = lean_ctor_get(x_3, 0);
x_14 = lean_ctor_get(x_3, 1);
lean_inc(x_14);
lean_inc(x_13);
lean_dec(x_3);
x_15 = lean_unsigned_to_nat(1u);
x_16 = lean_nat_sub(x_14, x_15);
lean_dec(x_14);
if (x_1 == 0)
{
lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; 
x_17 = lean_unsigned_to_nat(0u);
x_18 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_18, 0, x_2);
lean_ctor_set(x_18, 1, x_17);
x_19 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_19, 0, x_18);
x_20 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_20, 0, x_13);
lean_ctor_set(x_20, 1, x_16);
lean_ctor_set(x_20, 2, x_19);
return x_20;
}
else
{
lean_object* x_21; lean_object* x_22; 
lean_dec(x_2);
x_21 = lean_box(0);
x_22 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_22, 0, x_13);
lean_ctor_set(x_22, 1, x_16);
lean_ctor_set(x_22, 2, x_21);
return x_22;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse___lam__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; lean_object* x_5; 
x_4 = lean_unbox(x_1);
x_5 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse___lam__0(x_4, x_2, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_6 = lean_ctor_get(x_2, 0);
lean_inc_ref(x_6);
x_7 = l_Std_Channel_Sync_send___redArg(x_6, x_3);
x_8 = lean_io_mono_ms_now();
x_9 = lean_box(x_4);
x_10 = lean_alloc_closure((void*)(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse___lam__0___boxed), 3, 2);
lean_closure_set(x_10, 0, x_9);
lean_closure_set(x_10, 1, x_8);
x_11 = l_Lean_Server_FileWorker_WorkerContext_modifyPartialHandler(x_2, x_1, x_10);
lean_dec_ref(x_2);
x_12 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_12, 0, x_11);
return x_12;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint8_t x_6; lean_object* x_7; 
x_6 = lean_unbox(x_4);
x_7 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse(x_1, x_2, x_3, x_6);
return x_7;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_emitRequestResponse___redArg___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_box(0);
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_emitRequestResponse___redArg___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Server_FileWorker_emitRequestResponse___redArg___closed__0;
x_2 = lean_task_pure(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_emitRequestResponse___redArg___lam__0___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = l_Lean_Server_RequestError_requestCancelled;
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_emitRequestResponse___redArg___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_7; lean_object* x_8; uint8_t x_9; 
x_7 = lean_ctor_get(x_5, 0);
lean_inc(x_7);
lean_dec_ref(x_5);
x_8 = l_Lean_Server_RequestError_toLspResponseError(x_1, x_7);
lean_dec(x_7);
x_9 = !lean_is_exclusive(x_8);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_object* x_14; 
x_10 = lean_ctor_get(x_8, 2);
lean_dec(x_10);
x_11 = lean_box(0);
lean_ctor_set_tag(x_8, 3);
lean_ctor_set(x_8, 2, x_11);
x_12 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_8);
x_13 = 0;
x_14 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse(x_2, x_3, x_12, x_13);
return x_14;
}
else
{
lean_object* x_15; uint8_t x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; 
x_15 = lean_ctor_get(x_8, 0);
x_16 = lean_ctor_get_uint8(x_8, sizeof(void*)*3);
x_17 = lean_ctor_get(x_8, 1);
lean_inc(x_17);
lean_inc(x_15);
lean_dec(x_8);
x_18 = lean_box(0);
x_19 = lean_alloc_ctor(3, 3, 1);
lean_ctor_set(x_19, 0, x_15);
lean_ctor_set(x_19, 1, x_17);
lean_ctor_set(x_19, 2, x_18);
lean_ctor_set_uint8(x_19, sizeof(void*)*3, x_16);
x_20 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_19);
x_21 = 0;
x_22 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse(x_2, x_3, x_20, x_21);
return x_22;
}
}
else
{
lean_object* x_23; uint8_t x_24; 
x_23 = lean_ctor_get(x_5, 0);
lean_inc(x_23);
lean_dec_ref(x_5);
x_24 = l_Lean_Server_RequestCancellationToken_wasCancelledByCancelRequest(x_4);
if (x_24 == 0)
{
uint8_t x_25; lean_object* x_26; lean_object* x_27; 
x_25 = lean_ctor_get_uint8(x_23, sizeof(void*)*2);
x_26 = l_Lean_Server_FileWorker_OutputMessage_ofLspResponse(x_1, x_23);
x_27 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse(x_2, x_3, x_26, x_25);
return x_27;
}
else
{
lean_object* x_28; lean_object* x_29; uint8_t x_30; 
lean_dec(x_23);
x_28 = l_Lean_Server_FileWorker_emitRequestResponse___redArg___lam__0___closed__0;
x_29 = l_Lean_Server_RequestError_toLspResponseError(x_1, x_28);
x_30 = !lean_is_exclusive(x_29);
if (x_30 == 0)
{
lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; lean_object* x_35; uint8_t x_36; 
x_31 = lean_ctor_get(x_29, 2);
lean_dec(x_31);
x_32 = lean_box(0);
lean_ctor_set_tag(x_29, 3);
lean_ctor_set(x_29, 2, x_32);
x_33 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_29);
x_34 = 0;
x_35 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse(x_2, x_3, x_33, x_34);
x_36 = !lean_is_exclusive(x_35);
if (x_36 == 0)
{
lean_object* x_37; lean_object* x_38; 
x_37 = lean_ctor_get(x_35, 0);
lean_dec(x_37);
x_38 = lean_box(0);
lean_ctor_set(x_35, 0, x_38);
return x_35;
}
else
{
lean_object* x_39; lean_object* x_40; 
lean_dec(x_35);
x_39 = lean_box(0);
x_40 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_40, 0, x_39);
return x_40;
}
}
else
{
lean_object* x_41; uint8_t x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; 
x_41 = lean_ctor_get(x_29, 0);
x_42 = lean_ctor_get_uint8(x_29, sizeof(void*)*3);
x_43 = lean_ctor_get(x_29, 1);
lean_inc(x_43);
lean_inc(x_41);
lean_dec(x_29);
x_44 = lean_box(0);
x_45 = lean_alloc_ctor(3, 3, 1);
lean_ctor_set(x_45, 0, x_41);
lean_ctor_set(x_45, 1, x_43);
lean_ctor_set(x_45, 2, x_44);
lean_ctor_set_uint8(x_45, sizeof(void*)*3, x_42);
x_46 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_45);
x_47 = 0;
x_48 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse(x_2, x_3, x_46, x_47);
if (lean_is_exclusive(x_48)) {
 lean_ctor_release(x_48, 0);
 x_49 = x_48;
} else {
 lean_dec_ref(x_48);
 x_49 = lean_box(0);
}
x_50 = lean_box(0);
if (lean_is_scalar(x_49)) {
 x_51 = lean_alloc_ctor(0, 1, 0);
} else {
 x_51 = x_49;
}
lean_ctor_set(x_51, 0, x_50);
return x_51;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_emitRequestResponse___redArg___lam__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_Server_FileWorker_emitRequestResponse___redArg___lam__0(x_1, x_2, x_3, x_4, x_5);
lean_dec_ref(x_4);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_emitRequestResponse___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_7; lean_object* x_8; uint8_t x_9; 
lean_dec_ref(x_2);
x_7 = lean_ctor_get(x_1, 0);
lean_inc(x_7);
lean_dec_ref(x_1);
x_8 = l_Lean_Server_RequestError_toLspResponseError(x_3, x_7);
lean_dec(x_7);
x_9 = !lean_is_exclusive(x_8);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_object* x_14; uint8_t x_15; 
x_10 = lean_ctor_get(x_8, 2);
lean_dec(x_10);
x_11 = lean_box(0);
lean_ctor_set_tag(x_8, 3);
lean_ctor_set(x_8, 2, x_11);
x_12 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_8);
x_13 = 0;
x_14 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse(x_4, x_5, x_12, x_13);
x_15 = !lean_is_exclusive(x_14);
if (x_15 == 0)
{
lean_object* x_16; lean_object* x_17; 
x_16 = lean_ctor_get(x_14, 0);
lean_dec(x_16);
x_17 = l_Lean_Server_FileWorker_emitRequestResponse___redArg___closed__1;
lean_ctor_set(x_14, 0, x_17);
return x_14;
}
else
{
lean_object* x_18; lean_object* x_19; 
lean_dec(x_14);
x_18 = l_Lean_Server_FileWorker_emitRequestResponse___redArg___closed__1;
x_19 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_19, 0, x_18);
return x_19;
}
}
else
{
lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; 
x_20 = lean_ctor_get(x_8, 0);
x_21 = lean_ctor_get_uint8(x_8, sizeof(void*)*3);
x_22 = lean_ctor_get(x_8, 1);
lean_inc(x_22);
lean_inc(x_20);
lean_dec(x_8);
x_23 = lean_box(0);
x_24 = lean_alloc_ctor(3, 3, 1);
lean_ctor_set(x_24, 0, x_20);
lean_ctor_set(x_24, 1, x_22);
lean_ctor_set(x_24, 2, x_23);
lean_ctor_set_uint8(x_24, sizeof(void*)*3, x_21);
x_25 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_24);
x_26 = 0;
x_27 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_emitRequestResponse_emitResponse(x_4, x_5, x_25, x_26);
if (lean_is_exclusive(x_27)) {
 lean_ctor_release(x_27, 0);
 x_28 = x_27;
} else {
 lean_dec_ref(x_27);
 x_28 = lean_box(0);
}
x_29 = l_Lean_Server_FileWorker_emitRequestResponse___redArg___closed__1;
if (lean_is_scalar(x_28)) {
 x_30 = lean_alloc_ctor(0, 1, 0);
} else {
 x_30 = x_28;
}
lean_ctor_set(x_30, 0, x_29);
return x_30;
}
}
else
{
uint8_t x_31; 
x_31 = !lean_is_exclusive(x_1);
if (x_31 == 0)
{
lean_object* x_32; lean_object* x_33; lean_object* x_34; 
x_32 = lean_ctor_get(x_1, 0);
x_33 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_emitRequestResponse___redArg___lam__0___boxed), 6, 4);
lean_closure_set(x_33, 0, x_3);
lean_closure_set(x_33, 1, x_4);
lean_closure_set(x_33, 2, x_5);
lean_closure_set(x_33, 3, x_2);
x_34 = l_Lean_Server_ServerTask_IO_mapTaskCheap___redArg(x_33, x_32);
lean_ctor_set_tag(x_1, 0);
lean_ctor_set(x_1, 0, x_34);
return x_1;
}
else
{
lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; 
x_35 = lean_ctor_get(x_1, 0);
lean_inc(x_35);
lean_dec(x_1);
x_36 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_emitRequestResponse___redArg___lam__0___boxed), 6, 4);
lean_closure_set(x_36, 0, x_3);
lean_closure_set(x_36, 1, x_4);
lean_closure_set(x_36, 2, x_5);
lean_closure_set(x_36, 3, x_2);
x_37 = l_Lean_Server_ServerTask_IO_mapTaskCheap___redArg(x_36, x_35);
x_38 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_38, 0, x_37);
return x_38;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_emitRequestResponse(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_8; 
x_8 = l_Lean_Server_FileWorker_emitRequestResponse___redArg(x_1, x_2, x_3, x_4, x_5);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_emitRequestResponse___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l_Lean_Server_FileWorker_emitRequestResponse(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_6);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_emitRequestResponse___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_Server_FileWorker_emitRequestResponse___redArg(x_1, x_2, x_3, x_4, x_5);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRequest___lam__0(lean_object* x_1) {
_start:
{
uint8_t x_2; 
x_2 = !lean_is_exclusive(x_1);
if (x_2 == 0)
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; 
x_3 = lean_ctor_get(x_1, 1);
x_4 = lean_ctor_get(x_1, 2);
lean_dec(x_4);
x_5 = lean_unsigned_to_nat(1u);
x_6 = lean_nat_add(x_3, x_5);
lean_dec(x_3);
x_7 = lean_box(0);
lean_ctor_set(x_1, 2, x_7);
lean_ctor_set(x_1, 1, x_6);
return x_1;
}
else
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; 
x_8 = lean_ctor_get(x_1, 0);
x_9 = lean_ctor_get(x_1, 1);
lean_inc(x_9);
lean_inc(x_8);
lean_dec(x_1);
x_10 = lean_unsigned_to_nat(1u);
x_11 = lean_nat_add(x_9, x_10);
lean_dec(x_9);
x_12 = lean_box(0);
x_13 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_13, 0, x_8);
lean_ctor_set(x_13, 1, x_11);
lean_ctor_set(x_13, 2, x_12);
return x_13;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRequest(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; 
x_7 = lean_st_ref_get(x_5);
x_8 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lam__0), 1, 0);
lean_inc_ref(x_2);
x_9 = l_Lean_Server_FileWorker_WorkerContext_modifyPartialHandler(x_4, x_2, x_8);
lean_inc_ref(x_4);
lean_inc(x_3);
lean_inc(x_1);
x_10 = l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases(x_1, x_2, x_3, x_4, x_5);
x_11 = !lean_is_exclusive(x_10);
if (x_11 == 0)
{
lean_object* x_12; uint8_t x_13; 
x_12 = lean_ctor_get(x_10, 0);
x_13 = lean_unbox(x_12);
lean_dec(x_12);
if (x_13 == 0)
{
lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_22; lean_object* x_23; lean_object* x_26; lean_object* x_27; lean_object* x_30; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; 
lean_free_object(x_10);
x_14 = l_Lean_Server_RequestCancellationToken_new();
x_34 = lean_ctor_get(x_7, 0);
lean_inc_ref(x_34);
x_35 = lean_ctor_get(x_7, 4);
lean_inc(x_35);
x_36 = lean_ctor_get(x_4, 6);
x_37 = lean_ctor_get(x_4, 7);
lean_inc_ref(x_4);
x_38 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_sendUntypedServerRequest___boxed), 4, 1);
lean_closure_set(x_38, 0, x_4);
lean_inc_ref(x_14);
lean_inc_ref(x_37);
lean_inc_ref(x_36);
x_39 = lean_alloc_ctor(0, 6, 0);
lean_ctor_set(x_39, 0, x_35);
lean_ctor_set(x_39, 1, x_34);
lean_ctor_set(x_39, 2, x_36);
lean_ctor_set(x_39, 3, x_37);
lean_ctor_set(x_39, 4, x_14);
lean_ctor_set(x_39, 5, x_38);
lean_inc_ref(x_39);
lean_inc(x_3);
lean_inc(x_1);
x_40 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f(x_4, x_7, x_1, x_2, x_3, x_39);
if (lean_obj_tag(x_40) == 0)
{
lean_object* x_41; 
x_41 = lean_ctor_get(x_40, 0);
lean_inc(x_41);
lean_dec_ref(x_40);
if (lean_obj_tag(x_41) == 1)
{
lean_object* x_42; 
lean_dec_ref(x_39);
lean_dec(x_3);
x_42 = lean_ctor_get(x_41, 0);
lean_inc(x_42);
lean_dec_ref(x_41);
x_26 = x_42;
x_27 = lean_box(0);
goto block_29;
}
else
{
lean_object* x_43; 
lean_dec(x_41);
lean_inc_ref(x_39);
lean_inc(x_3);
x_43 = l_Lean_Server_handleLspRequest(x_2, x_3, x_39);
if (lean_obj_tag(x_43) == 0)
{
lean_object* x_44; lean_object* x_45; 
x_44 = lean_ctor_get(x_43, 0);
lean_inc(x_44);
lean_dec_ref(x_43);
lean_inc(x_1);
x_45 = l_Lean_Server_FileWorker_handlePostRequestSpecialCases(x_1, x_2, x_3, x_44, x_39);
x_30 = x_45;
goto block_33;
}
else
{
lean_dec_ref(x_39);
lean_dec(x_3);
x_30 = x_43;
goto block_33;
}
}
}
else
{
lean_object* x_46; 
lean_dec_ref(x_39);
lean_dec(x_3);
x_46 = lean_ctor_get(x_40, 0);
lean_inc(x_46);
lean_dec_ref(x_40);
x_22 = x_46;
x_23 = lean_box(0);
goto block_25;
}
block_21:
{
lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; 
lean_inc(x_1);
lean_inc_ref(x_14);
x_17 = l_Lean_Server_FileWorker_emitRequestResponse___redArg(x_15, x_14, x_1, x_2, x_4);
x_18 = lean_ctor_get(x_17, 0);
lean_inc(x_18);
lean_dec_ref(x_17);
x_19 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_19, 0, x_18);
lean_ctor_set(x_19, 1, x_14);
x_20 = l_Lean_Server_FileWorker_queueRequest___redArg(x_1, x_19, x_5);
return x_20;
}
block_25:
{
lean_object* x_24; 
x_24 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_24, 0, x_22);
x_15 = x_24;
x_16 = lean_box(0);
goto block_21;
}
block_29:
{
lean_object* x_28; 
x_28 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_28, 0, x_26);
x_15 = x_28;
x_16 = lean_box(0);
goto block_21;
}
block_33:
{
if (lean_obj_tag(x_30) == 0)
{
lean_object* x_31; 
x_31 = lean_ctor_get(x_30, 0);
lean_inc(x_31);
lean_dec_ref(x_30);
x_26 = x_31;
x_27 = lean_box(0);
goto block_29;
}
else
{
lean_object* x_32; 
x_32 = lean_ctor_get(x_30, 0);
lean_inc(x_32);
lean_dec_ref(x_30);
x_22 = x_32;
x_23 = lean_box(0);
goto block_25;
}
}
}
else
{
lean_object* x_47; 
lean_dec(x_7);
lean_dec_ref(x_4);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec(x_1);
x_47 = lean_box(0);
lean_ctor_set(x_10, 0, x_47);
return x_10;
}
}
else
{
lean_object* x_48; uint8_t x_49; 
x_48 = lean_ctor_get(x_10, 0);
lean_inc(x_48);
lean_dec(x_10);
x_49 = lean_unbox(x_48);
lean_dec(x_48);
if (x_49 == 0)
{
lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_58; lean_object* x_59; lean_object* x_62; lean_object* x_63; lean_object* x_66; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; 
x_50 = l_Lean_Server_RequestCancellationToken_new();
x_70 = lean_ctor_get(x_7, 0);
lean_inc_ref(x_70);
x_71 = lean_ctor_get(x_7, 4);
lean_inc(x_71);
x_72 = lean_ctor_get(x_4, 6);
x_73 = lean_ctor_get(x_4, 7);
lean_inc_ref(x_4);
x_74 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_sendUntypedServerRequest___boxed), 4, 1);
lean_closure_set(x_74, 0, x_4);
lean_inc_ref(x_50);
lean_inc_ref(x_73);
lean_inc_ref(x_72);
x_75 = lean_alloc_ctor(0, 6, 0);
lean_ctor_set(x_75, 0, x_71);
lean_ctor_set(x_75, 1, x_70);
lean_ctor_set(x_75, 2, x_72);
lean_ctor_set(x_75, 3, x_73);
lean_ctor_set(x_75, 4, x_50);
lean_ctor_set(x_75, 5, x_74);
lean_inc_ref(x_75);
lean_inc(x_3);
lean_inc(x_1);
x_76 = l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f(x_4, x_7, x_1, x_2, x_3, x_75);
if (lean_obj_tag(x_76) == 0)
{
lean_object* x_77; 
x_77 = lean_ctor_get(x_76, 0);
lean_inc(x_77);
lean_dec_ref(x_76);
if (lean_obj_tag(x_77) == 1)
{
lean_object* x_78; 
lean_dec_ref(x_75);
lean_dec(x_3);
x_78 = lean_ctor_get(x_77, 0);
lean_inc(x_78);
lean_dec_ref(x_77);
x_62 = x_78;
x_63 = lean_box(0);
goto block_65;
}
else
{
lean_object* x_79; 
lean_dec(x_77);
lean_inc_ref(x_75);
lean_inc(x_3);
x_79 = l_Lean_Server_handleLspRequest(x_2, x_3, x_75);
if (lean_obj_tag(x_79) == 0)
{
lean_object* x_80; lean_object* x_81; 
x_80 = lean_ctor_get(x_79, 0);
lean_inc(x_80);
lean_dec_ref(x_79);
lean_inc(x_1);
x_81 = l_Lean_Server_FileWorker_handlePostRequestSpecialCases(x_1, x_2, x_3, x_80, x_75);
x_66 = x_81;
goto block_69;
}
else
{
lean_dec_ref(x_75);
lean_dec(x_3);
x_66 = x_79;
goto block_69;
}
}
}
else
{
lean_object* x_82; 
lean_dec_ref(x_75);
lean_dec(x_3);
x_82 = lean_ctor_get(x_76, 0);
lean_inc(x_82);
lean_dec_ref(x_76);
x_58 = x_82;
x_59 = lean_box(0);
goto block_61;
}
block_57:
{
lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; 
lean_inc(x_1);
lean_inc_ref(x_50);
x_53 = l_Lean_Server_FileWorker_emitRequestResponse___redArg(x_51, x_50, x_1, x_2, x_4);
x_54 = lean_ctor_get(x_53, 0);
lean_inc(x_54);
lean_dec_ref(x_53);
x_55 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_55, 0, x_54);
lean_ctor_set(x_55, 1, x_50);
x_56 = l_Lean_Server_FileWorker_queueRequest___redArg(x_1, x_55, x_5);
return x_56;
}
block_61:
{
lean_object* x_60; 
x_60 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_60, 0, x_58);
x_51 = x_60;
x_52 = lean_box(0);
goto block_57;
}
block_65:
{
lean_object* x_64; 
x_64 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_64, 0, x_62);
x_51 = x_64;
x_52 = lean_box(0);
goto block_57;
}
block_69:
{
if (lean_obj_tag(x_66) == 0)
{
lean_object* x_67; 
x_67 = lean_ctor_get(x_66, 0);
lean_inc(x_67);
lean_dec_ref(x_66);
x_62 = x_67;
x_63 = lean_box(0);
goto block_65;
}
else
{
lean_object* x_68; 
x_68 = lean_ctor_get(x_66, 0);
lean_inc(x_68);
lean_dec_ref(x_66);
x_58 = x_68;
x_59 = lean_box(0);
goto block_61;
}
}
}
else
{
lean_object* x_83; lean_object* x_84; 
lean_dec(x_7);
lean_dec_ref(x_4);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec(x_1);
x_83 = lean_box(0);
x_84 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_84, 0, x_83);
return x_84;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleRequest___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_Server_FileWorker_handleRequest(x_1, x_2, x_3, x_4, x_5);
lean_dec(x_5);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleResponse___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; 
x_5 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_5, 0, x_2);
x_6 = l_Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse(x_3, x_1, x_5);
x_7 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_7, 0, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleResponse(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_Server_FileWorker_handleResponse___redArg(x_1, x_2, x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleResponse___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_Server_FileWorker_handleResponse(x_1, x_2, x_3, x_4);
lean_dec(x_4);
lean_dec_ref(x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleResponse___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_handleResponse___redArg(x_1, x_2, x_3);
lean_dec_ref(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleResponseError___redArg(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; 
x_6 = lean_alloc_ctor(1, 1, 1);
lean_ctor_set(x_6, 0, x_3);
lean_ctor_set_uint8(x_6, sizeof(void*)*1, x_2);
x_7 = l_Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse(x_4, x_1, x_6);
x_8 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_8, 0, x_7);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleResponseError(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_Server_FileWorker_handleResponseError___redArg(x_1, x_2, x_3, x_4);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleResponseError___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
uint8_t x_7; lean_object* x_8; 
x_7 = lean_unbox(x_2);
x_8 = l_Lean_Server_FileWorker_handleResponseError(x_1, x_7, x_3, x_4, x_5);
lean_dec(x_5);
lean_dec_ref(x_4);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_handleResponseError___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint8_t x_6; lean_object* x_7; 
x_6 = lean_unbox(x_2);
x_7 = l_Lean_Server_FileWorker_handleResponseError___redArg(x_1, x_6, x_3, x_4);
lean_dec_ref(x_4);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_mainLoop_spec__0___redArg(uint64_t x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint64_t x_8; uint8_t x_9; 
x_3 = lean_ctor_get(x_2, 1);
lean_inc(x_3);
x_4 = lean_ctor_get(x_2, 2);
lean_inc(x_4);
x_5 = lean_ctor_get(x_2, 3);
lean_inc(x_5);
x_6 = lean_ctor_get(x_2, 4);
lean_inc(x_6);
if (lean_is_exclusive(x_2)) {
 lean_ctor_release(x_2, 0);
 lean_ctor_release(x_2, 1);
 lean_ctor_release(x_2, 2);
 lean_ctor_release(x_2, 3);
 lean_ctor_release(x_2, 4);
 x_7 = x_2;
} else {
 lean_dec_ref(x_2);
 x_7 = lean_box(0);
}
x_8 = lean_unbox_uint64(x_3);
x_9 = lean_uint64_dec_lt(x_1, x_8);
if (x_9 == 0)
{
uint64_t x_10; uint8_t x_11; 
x_10 = lean_unbox_uint64(x_3);
x_11 = lean_uint64_dec_eq(x_1, x_10);
if (x_11 == 0)
{
lean_object* x_12; lean_object* x_13; 
x_12 = l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_mainLoop_spec__0___redArg(x_1, x_6);
x_13 = lean_unsigned_to_nat(1u);
if (lean_obj_tag(x_12) == 0)
{
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; 
x_14 = lean_ctor_get(x_12, 0);
lean_inc(x_14);
x_15 = lean_ctor_get(x_5, 0);
x_16 = lean_ctor_get(x_5, 1);
x_17 = lean_ctor_get(x_5, 2);
x_18 = lean_ctor_get(x_5, 3);
x_19 = lean_ctor_get(x_5, 4);
lean_inc(x_19);
x_20 = lean_unsigned_to_nat(3u);
x_21 = lean_nat_mul(x_20, x_14);
x_22 = lean_nat_dec_lt(x_21, x_15);
lean_dec(x_21);
if (x_22 == 0)
{
lean_object* x_23; lean_object* x_24; lean_object* x_25; 
lean_dec(x_19);
x_23 = lean_nat_add(x_13, x_15);
x_24 = lean_nat_add(x_23, x_14);
lean_dec(x_14);
lean_dec(x_23);
if (lean_is_scalar(x_7)) {
 x_25 = lean_alloc_ctor(0, 5, 0);
} else {
 x_25 = x_7;
}
lean_ctor_set(x_25, 0, x_24);
lean_ctor_set(x_25, 1, x_3);
lean_ctor_set(x_25, 2, x_4);
lean_ctor_set(x_25, 3, x_5);
lean_ctor_set(x_25, 4, x_12);
return x_25;
}
else
{
lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; 
lean_inc(x_18);
lean_inc(x_17);
lean_inc(x_16);
lean_inc(x_15);
if (lean_is_exclusive(x_5)) {
 lean_ctor_release(x_5, 0);
 lean_ctor_release(x_5, 1);
 lean_ctor_release(x_5, 2);
 lean_ctor_release(x_5, 3);
 lean_ctor_release(x_5, 4);
 x_26 = x_5;
} else {
 lean_dec_ref(x_5);
 x_26 = lean_box(0);
}
x_27 = lean_ctor_get(x_18, 0);
x_28 = lean_ctor_get(x_19, 0);
x_29 = lean_ctor_get(x_19, 1);
x_30 = lean_ctor_get(x_19, 2);
x_31 = lean_ctor_get(x_19, 3);
x_32 = lean_ctor_get(x_19, 4);
x_33 = lean_unsigned_to_nat(2u);
x_34 = lean_nat_mul(x_33, x_27);
x_35 = lean_nat_dec_lt(x_28, x_34);
lean_dec(x_34);
if (x_35 == 0)
{
lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_46; lean_object* x_47; 
lean_inc(x_32);
lean_inc(x_31);
lean_inc(x_30);
lean_inc(x_29);
if (lean_is_exclusive(x_19)) {
 lean_ctor_release(x_19, 0);
 lean_ctor_release(x_19, 1);
 lean_ctor_release(x_19, 2);
 lean_ctor_release(x_19, 3);
 lean_ctor_release(x_19, 4);
 x_36 = x_19;
} else {
 lean_dec_ref(x_19);
 x_36 = lean_box(0);
}
x_37 = lean_nat_add(x_13, x_15);
lean_dec(x_15);
x_38 = lean_nat_add(x_37, x_14);
lean_dec(x_37);
x_46 = lean_nat_add(x_13, x_27);
if (lean_obj_tag(x_31) == 0)
{
lean_object* x_54; 
x_54 = lean_ctor_get(x_31, 0);
lean_inc(x_54);
x_47 = x_54;
goto block_53;
}
else
{
lean_object* x_55; 
x_55 = lean_unsigned_to_nat(0u);
x_47 = x_55;
goto block_53;
}
block_45:
{
lean_object* x_42; lean_object* x_43; lean_object* x_44; 
x_42 = lean_nat_add(x_39, x_41);
lean_dec(x_41);
lean_dec(x_39);
if (lean_is_scalar(x_36)) {
 x_43 = lean_alloc_ctor(0, 5, 0);
} else {
 x_43 = x_36;
}
lean_ctor_set(x_43, 0, x_42);
lean_ctor_set(x_43, 1, x_3);
lean_ctor_set(x_43, 2, x_4);
lean_ctor_set(x_43, 3, x_32);
lean_ctor_set(x_43, 4, x_12);
if (lean_is_scalar(x_26)) {
 x_44 = lean_alloc_ctor(0, 5, 0);
} else {
 x_44 = x_26;
}
lean_ctor_set(x_44, 0, x_38);
lean_ctor_set(x_44, 1, x_29);
lean_ctor_set(x_44, 2, x_30);
lean_ctor_set(x_44, 3, x_40);
lean_ctor_set(x_44, 4, x_43);
return x_44;
}
block_53:
{
lean_object* x_48; lean_object* x_49; lean_object* x_50; 
x_48 = lean_nat_add(x_46, x_47);
lean_dec(x_47);
lean_dec(x_46);
if (lean_is_scalar(x_7)) {
 x_49 = lean_alloc_ctor(0, 5, 0);
} else {
 x_49 = x_7;
}
lean_ctor_set(x_49, 0, x_48);
lean_ctor_set(x_49, 1, x_16);
lean_ctor_set(x_49, 2, x_17);
lean_ctor_set(x_49, 3, x_18);
lean_ctor_set(x_49, 4, x_31);
x_50 = lean_nat_add(x_13, x_14);
lean_dec(x_14);
if (lean_obj_tag(x_32) == 0)
{
lean_object* x_51; 
x_51 = lean_ctor_get(x_32, 0);
lean_inc(x_51);
x_39 = x_50;
x_40 = x_49;
x_41 = x_51;
goto block_45;
}
else
{
lean_object* x_52; 
x_52 = lean_unsigned_to_nat(0u);
x_39 = x_50;
x_40 = x_49;
x_41 = x_52;
goto block_45;
}
}
}
else
{
lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; uint8_t x_61; 
lean_dec(x_7);
x_56 = lean_nat_add(x_13, x_15);
lean_dec(x_15);
x_57 = lean_nat_add(x_56, x_14);
lean_dec(x_56);
x_58 = lean_nat_add(x_13, x_14);
lean_dec(x_14);
x_59 = lean_nat_add(x_58, x_28);
lean_dec(x_58);
lean_inc_ref(x_12);
if (lean_is_scalar(x_26)) {
 x_60 = lean_alloc_ctor(0, 5, 0);
} else {
 x_60 = x_26;
}
lean_ctor_set(x_60, 0, x_59);
lean_ctor_set(x_60, 1, x_3);
lean_ctor_set(x_60, 2, x_4);
lean_ctor_set(x_60, 3, x_19);
lean_ctor_set(x_60, 4, x_12);
x_61 = !lean_is_exclusive(x_12);
if (x_61 == 0)
{
lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; 
x_62 = lean_ctor_get(x_12, 4);
lean_dec(x_62);
x_63 = lean_ctor_get(x_12, 3);
lean_dec(x_63);
x_64 = lean_ctor_get(x_12, 2);
lean_dec(x_64);
x_65 = lean_ctor_get(x_12, 1);
lean_dec(x_65);
x_66 = lean_ctor_get(x_12, 0);
lean_dec(x_66);
lean_ctor_set(x_12, 4, x_60);
lean_ctor_set(x_12, 3, x_18);
lean_ctor_set(x_12, 2, x_17);
lean_ctor_set(x_12, 1, x_16);
lean_ctor_set(x_12, 0, x_57);
return x_12;
}
else
{
lean_object* x_67; 
lean_dec(x_12);
x_67 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_67, 0, x_57);
lean_ctor_set(x_67, 1, x_16);
lean_ctor_set(x_67, 2, x_17);
lean_ctor_set(x_67, 3, x_18);
lean_ctor_set(x_67, 4, x_60);
return x_67;
}
}
}
}
else
{
lean_object* x_68; lean_object* x_69; lean_object* x_70; 
x_68 = lean_ctor_get(x_12, 0);
lean_inc(x_68);
x_69 = lean_nat_add(x_13, x_68);
lean_dec(x_68);
if (lean_is_scalar(x_7)) {
 x_70 = lean_alloc_ctor(0, 5, 0);
} else {
 x_70 = x_7;
}
lean_ctor_set(x_70, 0, x_69);
lean_ctor_set(x_70, 1, x_3);
lean_ctor_set(x_70, 2, x_4);
lean_ctor_set(x_70, 3, x_5);
lean_ctor_set(x_70, 4, x_12);
return x_70;
}
}
else
{
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_71; 
x_71 = lean_ctor_get(x_5, 3);
if (lean_obj_tag(x_71) == 0)
{
lean_object* x_72; 
lean_inc_ref(x_71);
x_72 = lean_ctor_get(x_5, 4);
lean_inc(x_72);
if (lean_obj_tag(x_72) == 0)
{
uint8_t x_73; 
x_73 = !lean_is_exclusive(x_5);
if (x_73 == 0)
{
lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; 
x_74 = lean_ctor_get(x_5, 0);
x_75 = lean_ctor_get(x_5, 1);
x_76 = lean_ctor_get(x_5, 2);
x_77 = lean_ctor_get(x_5, 4);
lean_dec(x_77);
x_78 = lean_ctor_get(x_5, 3);
lean_dec(x_78);
x_79 = lean_ctor_get(x_72, 0);
x_80 = lean_nat_add(x_13, x_74);
lean_dec(x_74);
x_81 = lean_nat_add(x_13, x_79);
lean_ctor_set(x_5, 4, x_12);
lean_ctor_set(x_5, 3, x_72);
lean_ctor_set(x_5, 2, x_4);
lean_ctor_set(x_5, 1, x_3);
lean_ctor_set(x_5, 0, x_81);
if (lean_is_scalar(x_7)) {
 x_82 = lean_alloc_ctor(0, 5, 0);
} else {
 x_82 = x_7;
}
lean_ctor_set(x_82, 0, x_80);
lean_ctor_set(x_82, 1, x_75);
lean_ctor_set(x_82, 2, x_76);
lean_ctor_set(x_82, 3, x_71);
lean_ctor_set(x_82, 4, x_5);
return x_82;
}
else
{
lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; 
x_83 = lean_ctor_get(x_5, 0);
x_84 = lean_ctor_get(x_5, 1);
x_85 = lean_ctor_get(x_5, 2);
lean_inc(x_85);
lean_inc(x_84);
lean_inc(x_83);
lean_dec(x_5);
x_86 = lean_ctor_get(x_72, 0);
x_87 = lean_nat_add(x_13, x_83);
lean_dec(x_83);
x_88 = lean_nat_add(x_13, x_86);
x_89 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_89, 0, x_88);
lean_ctor_set(x_89, 1, x_3);
lean_ctor_set(x_89, 2, x_4);
lean_ctor_set(x_89, 3, x_72);
lean_ctor_set(x_89, 4, x_12);
if (lean_is_scalar(x_7)) {
 x_90 = lean_alloc_ctor(0, 5, 0);
} else {
 x_90 = x_7;
}
lean_ctor_set(x_90, 0, x_87);
lean_ctor_set(x_90, 1, x_84);
lean_ctor_set(x_90, 2, x_85);
lean_ctor_set(x_90, 3, x_71);
lean_ctor_set(x_90, 4, x_89);
return x_90;
}
}
else
{
uint8_t x_91; 
x_91 = !lean_is_exclusive(x_5);
if (x_91 == 0)
{
lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; 
x_92 = lean_ctor_get(x_5, 1);
x_93 = lean_ctor_get(x_5, 2);
x_94 = lean_ctor_get(x_5, 4);
lean_dec(x_94);
x_95 = lean_ctor_get(x_5, 3);
lean_dec(x_95);
x_96 = lean_ctor_get(x_5, 0);
lean_dec(x_96);
x_97 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_5, 3, x_72);
lean_ctor_set(x_5, 2, x_4);
lean_ctor_set(x_5, 1, x_3);
lean_ctor_set(x_5, 0, x_13);
if (lean_is_scalar(x_7)) {
 x_98 = lean_alloc_ctor(0, 5, 0);
} else {
 x_98 = x_7;
}
lean_ctor_set(x_98, 0, x_97);
lean_ctor_set(x_98, 1, x_92);
lean_ctor_set(x_98, 2, x_93);
lean_ctor_set(x_98, 3, x_71);
lean_ctor_set(x_98, 4, x_5);
return x_98;
}
else
{
lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; 
x_99 = lean_ctor_get(x_5, 1);
x_100 = lean_ctor_get(x_5, 2);
lean_inc(x_100);
lean_inc(x_99);
lean_dec(x_5);
x_101 = lean_unsigned_to_nat(3u);
x_102 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_102, 0, x_13);
lean_ctor_set(x_102, 1, x_3);
lean_ctor_set(x_102, 2, x_4);
lean_ctor_set(x_102, 3, x_72);
lean_ctor_set(x_102, 4, x_72);
if (lean_is_scalar(x_7)) {
 x_103 = lean_alloc_ctor(0, 5, 0);
} else {
 x_103 = x_7;
}
lean_ctor_set(x_103, 0, x_101);
lean_ctor_set(x_103, 1, x_99);
lean_ctor_set(x_103, 2, x_100);
lean_ctor_set(x_103, 3, x_71);
lean_ctor_set(x_103, 4, x_102);
return x_103;
}
}
}
else
{
lean_object* x_104; 
x_104 = lean_ctor_get(x_5, 4);
lean_inc(x_104);
if (lean_obj_tag(x_104) == 0)
{
uint8_t x_105; 
lean_inc(x_71);
x_105 = !lean_is_exclusive(x_5);
if (x_105 == 0)
{
lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; uint8_t x_111; 
x_106 = lean_ctor_get(x_5, 1);
x_107 = lean_ctor_get(x_5, 2);
x_108 = lean_ctor_get(x_5, 4);
lean_dec(x_108);
x_109 = lean_ctor_get(x_5, 3);
lean_dec(x_109);
x_110 = lean_ctor_get(x_5, 0);
lean_dec(x_110);
x_111 = !lean_is_exclusive(x_104);
if (x_111 == 0)
{
lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; 
x_112 = lean_ctor_get(x_104, 1);
x_113 = lean_ctor_get(x_104, 2);
x_114 = lean_ctor_get(x_104, 4);
lean_dec(x_114);
x_115 = lean_ctor_get(x_104, 3);
lean_dec(x_115);
x_116 = lean_ctor_get(x_104, 0);
lean_dec(x_116);
x_117 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_104, 4, x_71);
lean_ctor_set(x_104, 3, x_71);
lean_ctor_set(x_104, 2, x_107);
lean_ctor_set(x_104, 1, x_106);
lean_ctor_set(x_104, 0, x_13);
lean_ctor_set(x_5, 4, x_71);
lean_ctor_set(x_5, 2, x_4);
lean_ctor_set(x_5, 1, x_3);
lean_ctor_set(x_5, 0, x_13);
if (lean_is_scalar(x_7)) {
 x_118 = lean_alloc_ctor(0, 5, 0);
} else {
 x_118 = x_7;
}
lean_ctor_set(x_118, 0, x_117);
lean_ctor_set(x_118, 1, x_112);
lean_ctor_set(x_118, 2, x_113);
lean_ctor_set(x_118, 3, x_104);
lean_ctor_set(x_118, 4, x_5);
return x_118;
}
else
{
lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; 
x_119 = lean_ctor_get(x_104, 1);
x_120 = lean_ctor_get(x_104, 2);
lean_inc(x_120);
lean_inc(x_119);
lean_dec(x_104);
x_121 = lean_unsigned_to_nat(3u);
x_122 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_122, 0, x_13);
lean_ctor_set(x_122, 1, x_106);
lean_ctor_set(x_122, 2, x_107);
lean_ctor_set(x_122, 3, x_71);
lean_ctor_set(x_122, 4, x_71);
lean_ctor_set(x_5, 4, x_71);
lean_ctor_set(x_5, 2, x_4);
lean_ctor_set(x_5, 1, x_3);
lean_ctor_set(x_5, 0, x_13);
if (lean_is_scalar(x_7)) {
 x_123 = lean_alloc_ctor(0, 5, 0);
} else {
 x_123 = x_7;
}
lean_ctor_set(x_123, 0, x_121);
lean_ctor_set(x_123, 1, x_119);
lean_ctor_set(x_123, 2, x_120);
lean_ctor_set(x_123, 3, x_122);
lean_ctor_set(x_123, 4, x_5);
return x_123;
}
}
else
{
lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; 
x_124 = lean_ctor_get(x_5, 1);
x_125 = lean_ctor_get(x_5, 2);
lean_inc(x_125);
lean_inc(x_124);
lean_dec(x_5);
x_126 = lean_ctor_get(x_104, 1);
lean_inc(x_126);
x_127 = lean_ctor_get(x_104, 2);
lean_inc(x_127);
if (lean_is_exclusive(x_104)) {
 lean_ctor_release(x_104, 0);
 lean_ctor_release(x_104, 1);
 lean_ctor_release(x_104, 2);
 lean_ctor_release(x_104, 3);
 lean_ctor_release(x_104, 4);
 x_128 = x_104;
} else {
 lean_dec_ref(x_104);
 x_128 = lean_box(0);
}
x_129 = lean_unsigned_to_nat(3u);
if (lean_is_scalar(x_128)) {
 x_130 = lean_alloc_ctor(0, 5, 0);
} else {
 x_130 = x_128;
}
lean_ctor_set(x_130, 0, x_13);
lean_ctor_set(x_130, 1, x_124);
lean_ctor_set(x_130, 2, x_125);
lean_ctor_set(x_130, 3, x_71);
lean_ctor_set(x_130, 4, x_71);
x_131 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_131, 0, x_13);
lean_ctor_set(x_131, 1, x_3);
lean_ctor_set(x_131, 2, x_4);
lean_ctor_set(x_131, 3, x_71);
lean_ctor_set(x_131, 4, x_71);
if (lean_is_scalar(x_7)) {
 x_132 = lean_alloc_ctor(0, 5, 0);
} else {
 x_132 = x_7;
}
lean_ctor_set(x_132, 0, x_129);
lean_ctor_set(x_132, 1, x_126);
lean_ctor_set(x_132, 2, x_127);
lean_ctor_set(x_132, 3, x_130);
lean_ctor_set(x_132, 4, x_131);
return x_132;
}
}
else
{
lean_object* x_133; lean_object* x_134; 
x_133 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_7)) {
 x_134 = lean_alloc_ctor(0, 5, 0);
} else {
 x_134 = x_7;
}
lean_ctor_set(x_134, 0, x_133);
lean_ctor_set(x_134, 1, x_3);
lean_ctor_set(x_134, 2, x_4);
lean_ctor_set(x_134, 3, x_5);
lean_ctor_set(x_134, 4, x_104);
return x_134;
}
}
}
else
{
lean_object* x_135; 
if (lean_is_scalar(x_7)) {
 x_135 = lean_alloc_ctor(0, 5, 0);
} else {
 x_135 = x_7;
}
lean_ctor_set(x_135, 0, x_13);
lean_ctor_set(x_135, 1, x_3);
lean_ctor_set(x_135, 2, x_4);
lean_ctor_set(x_135, 3, x_5);
lean_ctor_set(x_135, 4, x_5);
return x_135;
}
}
}
else
{
lean_dec(x_7);
lean_dec(x_4);
lean_dec(x_3);
if (lean_obj_tag(x_5) == 0)
{
if (lean_obj_tag(x_6) == 0)
{
lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; uint8_t x_147; 
x_136 = lean_ctor_get(x_5, 0);
x_137 = lean_ctor_get(x_5, 1);
x_138 = lean_ctor_get(x_5, 2);
x_139 = lean_ctor_get(x_5, 3);
x_140 = lean_ctor_get(x_5, 4);
lean_inc(x_140);
x_141 = lean_ctor_get(x_6, 0);
x_142 = lean_ctor_get(x_6, 1);
x_143 = lean_ctor_get(x_6, 2);
x_144 = lean_ctor_get(x_6, 3);
lean_inc(x_144);
x_145 = lean_ctor_get(x_6, 4);
x_146 = lean_unsigned_to_nat(1u);
x_147 = lean_nat_dec_lt(x_136, x_141);
if (x_147 == 0)
{
lean_object* x_148; lean_object* x_149; lean_object* x_150; 
lean_inc(x_139);
lean_inc(x_138);
lean_inc(x_137);
if (lean_is_exclusive(x_5)) {
 lean_ctor_release(x_5, 0);
 lean_ctor_release(x_5, 1);
 lean_ctor_release(x_5, 2);
 lean_ctor_release(x_5, 3);
 lean_ctor_release(x_5, 4);
 x_148 = x_5;
} else {
 lean_dec_ref(x_5);
 x_148 = lean_box(0);
}
x_149 = l_Std_DTreeMap_Internal_Impl_maxView___redArg(x_137, x_138, x_139, x_140);
x_150 = lean_ctor_get(x_149, 2);
lean_inc(x_150);
if (lean_obj_tag(x_150) == 0)
{
lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; uint8_t x_156; 
x_151 = lean_ctor_get(x_149, 0);
lean_inc(x_151);
x_152 = lean_ctor_get(x_149, 1);
lean_inc(x_152);
lean_dec_ref(x_149);
x_153 = lean_ctor_get(x_150, 0);
x_154 = lean_unsigned_to_nat(3u);
x_155 = lean_nat_mul(x_154, x_153);
x_156 = lean_nat_dec_lt(x_155, x_141);
lean_dec(x_155);
if (x_156 == 0)
{
lean_object* x_157; lean_object* x_158; lean_object* x_159; 
lean_dec(x_144);
x_157 = lean_nat_add(x_146, x_153);
x_158 = lean_nat_add(x_157, x_141);
lean_dec(x_157);
if (lean_is_scalar(x_148)) {
 x_159 = lean_alloc_ctor(0, 5, 0);
} else {
 x_159 = x_148;
}
lean_ctor_set(x_159, 0, x_158);
lean_ctor_set(x_159, 1, x_151);
lean_ctor_set(x_159, 2, x_152);
lean_ctor_set(x_159, 3, x_150);
lean_ctor_set(x_159, 4, x_6);
return x_159;
}
else
{
lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; uint8_t x_169; 
lean_inc(x_145);
lean_inc(x_143);
lean_inc(x_142);
lean_inc(x_141);
if (lean_is_exclusive(x_6)) {
 lean_ctor_release(x_6, 0);
 lean_ctor_release(x_6, 1);
 lean_ctor_release(x_6, 2);
 lean_ctor_release(x_6, 3);
 lean_ctor_release(x_6, 4);
 x_160 = x_6;
} else {
 lean_dec_ref(x_6);
 x_160 = lean_box(0);
}
x_161 = lean_ctor_get(x_144, 0);
x_162 = lean_ctor_get(x_144, 1);
x_163 = lean_ctor_get(x_144, 2);
x_164 = lean_ctor_get(x_144, 3);
x_165 = lean_ctor_get(x_144, 4);
x_166 = lean_ctor_get(x_145, 0);
x_167 = lean_unsigned_to_nat(2u);
x_168 = lean_nat_mul(x_167, x_166);
x_169 = lean_nat_dec_lt(x_161, x_168);
lean_dec(x_168);
if (x_169 == 0)
{
lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_180; 
lean_inc(x_165);
lean_inc(x_164);
lean_inc(x_163);
lean_inc(x_162);
if (lean_is_exclusive(x_144)) {
 lean_ctor_release(x_144, 0);
 lean_ctor_release(x_144, 1);
 lean_ctor_release(x_144, 2);
 lean_ctor_release(x_144, 3);
 lean_ctor_release(x_144, 4);
 x_170 = x_144;
} else {
 lean_dec_ref(x_144);
 x_170 = lean_box(0);
}
x_171 = lean_nat_add(x_146, x_153);
x_172 = lean_nat_add(x_171, x_141);
lean_dec(x_141);
if (lean_obj_tag(x_164) == 0)
{
lean_object* x_187; 
x_187 = lean_ctor_get(x_164, 0);
lean_inc(x_187);
x_180 = x_187;
goto block_186;
}
else
{
lean_object* x_188; 
x_188 = lean_unsigned_to_nat(0u);
x_180 = x_188;
goto block_186;
}
block_179:
{
lean_object* x_176; lean_object* x_177; lean_object* x_178; 
x_176 = lean_nat_add(x_173, x_175);
lean_dec(x_175);
lean_dec(x_173);
if (lean_is_scalar(x_170)) {
 x_177 = lean_alloc_ctor(0, 5, 0);
} else {
 x_177 = x_170;
}
lean_ctor_set(x_177, 0, x_176);
lean_ctor_set(x_177, 1, x_142);
lean_ctor_set(x_177, 2, x_143);
lean_ctor_set(x_177, 3, x_165);
lean_ctor_set(x_177, 4, x_145);
if (lean_is_scalar(x_160)) {
 x_178 = lean_alloc_ctor(0, 5, 0);
} else {
 x_178 = x_160;
}
lean_ctor_set(x_178, 0, x_172);
lean_ctor_set(x_178, 1, x_162);
lean_ctor_set(x_178, 2, x_163);
lean_ctor_set(x_178, 3, x_174);
lean_ctor_set(x_178, 4, x_177);
return x_178;
}
block_186:
{
lean_object* x_181; lean_object* x_182; lean_object* x_183; 
x_181 = lean_nat_add(x_171, x_180);
lean_dec(x_180);
lean_dec(x_171);
if (lean_is_scalar(x_148)) {
 x_182 = lean_alloc_ctor(0, 5, 0);
} else {
 x_182 = x_148;
}
lean_ctor_set(x_182, 0, x_181);
lean_ctor_set(x_182, 1, x_151);
lean_ctor_set(x_182, 2, x_152);
lean_ctor_set(x_182, 3, x_150);
lean_ctor_set(x_182, 4, x_164);
x_183 = lean_nat_add(x_146, x_166);
if (lean_obj_tag(x_165) == 0)
{
lean_object* x_184; 
x_184 = lean_ctor_get(x_165, 0);
lean_inc(x_184);
x_173 = x_183;
x_174 = x_182;
x_175 = x_184;
goto block_179;
}
else
{
lean_object* x_185; 
x_185 = lean_unsigned_to_nat(0u);
x_173 = x_183;
x_174 = x_182;
x_175 = x_185;
goto block_179;
}
}
}
else
{
lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; 
x_189 = lean_nat_add(x_146, x_153);
x_190 = lean_nat_add(x_189, x_141);
lean_dec(x_141);
x_191 = lean_nat_add(x_189, x_161);
lean_dec(x_189);
if (lean_is_scalar(x_160)) {
 x_192 = lean_alloc_ctor(0, 5, 0);
} else {
 x_192 = x_160;
}
lean_ctor_set(x_192, 0, x_191);
lean_ctor_set(x_192, 1, x_151);
lean_ctor_set(x_192, 2, x_152);
lean_ctor_set(x_192, 3, x_150);
lean_ctor_set(x_192, 4, x_144);
if (lean_is_scalar(x_148)) {
 x_193 = lean_alloc_ctor(0, 5, 0);
} else {
 x_193 = x_148;
}
lean_ctor_set(x_193, 0, x_190);
lean_ctor_set(x_193, 1, x_142);
lean_ctor_set(x_193, 2, x_143);
lean_ctor_set(x_193, 3, x_192);
lean_ctor_set(x_193, 4, x_145);
return x_193;
}
}
}
else
{
uint8_t x_194; 
lean_inc(x_145);
lean_inc(x_143);
lean_inc(x_142);
lean_inc(x_141);
x_194 = !lean_is_exclusive(x_6);
if (x_194 == 0)
{
lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; 
x_195 = lean_ctor_get(x_6, 4);
lean_dec(x_195);
x_196 = lean_ctor_get(x_6, 3);
lean_dec(x_196);
x_197 = lean_ctor_get(x_6, 2);
lean_dec(x_197);
x_198 = lean_ctor_get(x_6, 1);
lean_dec(x_198);
x_199 = lean_ctor_get(x_6, 0);
lean_dec(x_199);
if (lean_obj_tag(x_144) == 0)
{
if (lean_obj_tag(x_145) == 0)
{
lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; 
x_200 = lean_ctor_get(x_149, 0);
lean_inc(x_200);
x_201 = lean_ctor_get(x_149, 1);
lean_inc(x_201);
lean_dec_ref(x_149);
x_202 = lean_ctor_get(x_144, 0);
x_203 = lean_nat_add(x_146, x_141);
lean_dec(x_141);
x_204 = lean_nat_add(x_146, x_202);
lean_ctor_set(x_6, 4, x_144);
lean_ctor_set(x_6, 3, x_150);
lean_ctor_set(x_6, 2, x_201);
lean_ctor_set(x_6, 1, x_200);
lean_ctor_set(x_6, 0, x_204);
if (lean_is_scalar(x_148)) {
 x_205 = lean_alloc_ctor(0, 5, 0);
} else {
 x_205 = x_148;
}
lean_ctor_set(x_205, 0, x_203);
lean_ctor_set(x_205, 1, x_142);
lean_ctor_set(x_205, 2, x_143);
lean_ctor_set(x_205, 3, x_6);
lean_ctor_set(x_205, 4, x_145);
return x_205;
}
else
{
lean_object* x_206; lean_object* x_207; uint8_t x_208; 
lean_dec(x_141);
x_206 = lean_ctor_get(x_149, 0);
lean_inc(x_206);
x_207 = lean_ctor_get(x_149, 1);
lean_inc(x_207);
lean_dec_ref(x_149);
x_208 = !lean_is_exclusive(x_144);
if (x_208 == 0)
{
lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; 
x_209 = lean_ctor_get(x_144, 1);
x_210 = lean_ctor_get(x_144, 2);
x_211 = lean_ctor_get(x_144, 4);
lean_dec(x_211);
x_212 = lean_ctor_get(x_144, 3);
lean_dec(x_212);
x_213 = lean_ctor_get(x_144, 0);
lean_dec(x_213);
x_214 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_144, 4, x_145);
lean_ctor_set(x_144, 3, x_145);
lean_ctor_set(x_144, 2, x_207);
lean_ctor_set(x_144, 1, x_206);
lean_ctor_set(x_144, 0, x_146);
lean_ctor_set(x_6, 3, x_145);
lean_ctor_set(x_6, 0, x_146);
if (lean_is_scalar(x_148)) {
 x_215 = lean_alloc_ctor(0, 5, 0);
} else {
 x_215 = x_148;
}
lean_ctor_set(x_215, 0, x_214);
lean_ctor_set(x_215, 1, x_209);
lean_ctor_set(x_215, 2, x_210);
lean_ctor_set(x_215, 3, x_144);
lean_ctor_set(x_215, 4, x_6);
return x_215;
}
else
{
lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; 
x_216 = lean_ctor_get(x_144, 1);
x_217 = lean_ctor_get(x_144, 2);
lean_inc(x_217);
lean_inc(x_216);
lean_dec(x_144);
x_218 = lean_unsigned_to_nat(3u);
x_219 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_219, 0, x_146);
lean_ctor_set(x_219, 1, x_206);
lean_ctor_set(x_219, 2, x_207);
lean_ctor_set(x_219, 3, x_145);
lean_ctor_set(x_219, 4, x_145);
lean_ctor_set(x_6, 3, x_145);
lean_ctor_set(x_6, 0, x_146);
if (lean_is_scalar(x_148)) {
 x_220 = lean_alloc_ctor(0, 5, 0);
} else {
 x_220 = x_148;
}
lean_ctor_set(x_220, 0, x_218);
lean_ctor_set(x_220, 1, x_216);
lean_ctor_set(x_220, 2, x_217);
lean_ctor_set(x_220, 3, x_219);
lean_ctor_set(x_220, 4, x_6);
return x_220;
}
}
}
else
{
if (lean_obj_tag(x_145) == 0)
{
lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; 
lean_dec(x_141);
x_221 = lean_ctor_get(x_149, 0);
lean_inc(x_221);
x_222 = lean_ctor_get(x_149, 1);
lean_inc(x_222);
lean_dec_ref(x_149);
x_223 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_6, 4, x_144);
lean_ctor_set(x_6, 2, x_222);
lean_ctor_set(x_6, 1, x_221);
lean_ctor_set(x_6, 0, x_146);
if (lean_is_scalar(x_148)) {
 x_224 = lean_alloc_ctor(0, 5, 0);
} else {
 x_224 = x_148;
}
lean_ctor_set(x_224, 0, x_223);
lean_ctor_set(x_224, 1, x_142);
lean_ctor_set(x_224, 2, x_143);
lean_ctor_set(x_224, 3, x_6);
lean_ctor_set(x_224, 4, x_145);
return x_224;
}
else
{
lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; 
x_225 = lean_ctor_get(x_149, 0);
lean_inc(x_225);
x_226 = lean_ctor_get(x_149, 1);
lean_inc(x_226);
lean_dec_ref(x_149);
lean_ctor_set(x_6, 3, x_145);
x_227 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_148)) {
 x_228 = lean_alloc_ctor(0, 5, 0);
} else {
 x_228 = x_148;
}
lean_ctor_set(x_228, 0, x_227);
lean_ctor_set(x_228, 1, x_225);
lean_ctor_set(x_228, 2, x_226);
lean_ctor_set(x_228, 3, x_145);
lean_ctor_set(x_228, 4, x_6);
return x_228;
}
}
}
else
{
lean_dec(x_6);
if (lean_obj_tag(x_144) == 0)
{
if (lean_obj_tag(x_145) == 0)
{
lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; 
x_229 = lean_ctor_get(x_149, 0);
lean_inc(x_229);
x_230 = lean_ctor_get(x_149, 1);
lean_inc(x_230);
lean_dec_ref(x_149);
x_231 = lean_ctor_get(x_144, 0);
x_232 = lean_nat_add(x_146, x_141);
lean_dec(x_141);
x_233 = lean_nat_add(x_146, x_231);
x_234 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_234, 0, x_233);
lean_ctor_set(x_234, 1, x_229);
lean_ctor_set(x_234, 2, x_230);
lean_ctor_set(x_234, 3, x_150);
lean_ctor_set(x_234, 4, x_144);
if (lean_is_scalar(x_148)) {
 x_235 = lean_alloc_ctor(0, 5, 0);
} else {
 x_235 = x_148;
}
lean_ctor_set(x_235, 0, x_232);
lean_ctor_set(x_235, 1, x_142);
lean_ctor_set(x_235, 2, x_143);
lean_ctor_set(x_235, 3, x_234);
lean_ctor_set(x_235, 4, x_145);
return x_235;
}
else
{
lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; 
lean_dec(x_141);
x_236 = lean_ctor_get(x_149, 0);
lean_inc(x_236);
x_237 = lean_ctor_get(x_149, 1);
lean_inc(x_237);
lean_dec_ref(x_149);
x_238 = lean_ctor_get(x_144, 1);
lean_inc(x_238);
x_239 = lean_ctor_get(x_144, 2);
lean_inc(x_239);
if (lean_is_exclusive(x_144)) {
 lean_ctor_release(x_144, 0);
 lean_ctor_release(x_144, 1);
 lean_ctor_release(x_144, 2);
 lean_ctor_release(x_144, 3);
 lean_ctor_release(x_144, 4);
 x_240 = x_144;
} else {
 lean_dec_ref(x_144);
 x_240 = lean_box(0);
}
x_241 = lean_unsigned_to_nat(3u);
if (lean_is_scalar(x_240)) {
 x_242 = lean_alloc_ctor(0, 5, 0);
} else {
 x_242 = x_240;
}
lean_ctor_set(x_242, 0, x_146);
lean_ctor_set(x_242, 1, x_236);
lean_ctor_set(x_242, 2, x_237);
lean_ctor_set(x_242, 3, x_145);
lean_ctor_set(x_242, 4, x_145);
x_243 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_243, 0, x_146);
lean_ctor_set(x_243, 1, x_142);
lean_ctor_set(x_243, 2, x_143);
lean_ctor_set(x_243, 3, x_145);
lean_ctor_set(x_243, 4, x_145);
if (lean_is_scalar(x_148)) {
 x_244 = lean_alloc_ctor(0, 5, 0);
} else {
 x_244 = x_148;
}
lean_ctor_set(x_244, 0, x_241);
lean_ctor_set(x_244, 1, x_238);
lean_ctor_set(x_244, 2, x_239);
lean_ctor_set(x_244, 3, x_242);
lean_ctor_set(x_244, 4, x_243);
return x_244;
}
}
else
{
if (lean_obj_tag(x_145) == 0)
{
lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; 
lean_dec(x_141);
x_245 = lean_ctor_get(x_149, 0);
lean_inc(x_245);
x_246 = lean_ctor_get(x_149, 1);
lean_inc(x_246);
lean_dec_ref(x_149);
x_247 = lean_unsigned_to_nat(3u);
x_248 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_248, 0, x_146);
lean_ctor_set(x_248, 1, x_245);
lean_ctor_set(x_248, 2, x_246);
lean_ctor_set(x_248, 3, x_144);
lean_ctor_set(x_248, 4, x_144);
if (lean_is_scalar(x_148)) {
 x_249 = lean_alloc_ctor(0, 5, 0);
} else {
 x_249 = x_148;
}
lean_ctor_set(x_249, 0, x_247);
lean_ctor_set(x_249, 1, x_142);
lean_ctor_set(x_249, 2, x_143);
lean_ctor_set(x_249, 3, x_248);
lean_ctor_set(x_249, 4, x_145);
return x_249;
}
else
{
lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; 
x_250 = lean_ctor_get(x_149, 0);
lean_inc(x_250);
x_251 = lean_ctor_get(x_149, 1);
lean_inc(x_251);
lean_dec_ref(x_149);
x_252 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_252, 0, x_141);
lean_ctor_set(x_252, 1, x_142);
lean_ctor_set(x_252, 2, x_143);
lean_ctor_set(x_252, 3, x_145);
lean_ctor_set(x_252, 4, x_145);
x_253 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_148)) {
 x_254 = lean_alloc_ctor(0, 5, 0);
} else {
 x_254 = x_148;
}
lean_ctor_set(x_254, 0, x_253);
lean_ctor_set(x_254, 1, x_250);
lean_ctor_set(x_254, 2, x_251);
lean_ctor_set(x_254, 3, x_145);
lean_ctor_set(x_254, 4, x_252);
return x_254;
}
}
}
}
}
else
{
lean_object* x_255; lean_object* x_256; lean_object* x_257; 
lean_inc(x_145);
lean_inc(x_143);
lean_inc(x_142);
if (lean_is_exclusive(x_6)) {
 lean_ctor_release(x_6, 0);
 lean_ctor_release(x_6, 1);
 lean_ctor_release(x_6, 2);
 lean_ctor_release(x_6, 3);
 lean_ctor_release(x_6, 4);
 x_255 = x_6;
} else {
 lean_dec_ref(x_6);
 x_255 = lean_box(0);
}
x_256 = l_Std_DTreeMap_Internal_Impl_minView___redArg(x_142, x_143, x_144, x_145);
x_257 = lean_ctor_get(x_256, 2);
lean_inc(x_257);
if (lean_obj_tag(x_257) == 0)
{
lean_object* x_258; lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; uint8_t x_263; 
x_258 = lean_ctor_get(x_256, 0);
lean_inc(x_258);
x_259 = lean_ctor_get(x_256, 1);
lean_inc(x_259);
lean_dec_ref(x_256);
x_260 = lean_ctor_get(x_257, 0);
x_261 = lean_unsigned_to_nat(3u);
x_262 = lean_nat_mul(x_261, x_260);
x_263 = lean_nat_dec_lt(x_262, x_136);
lean_dec(x_262);
if (x_263 == 0)
{
lean_object* x_264; lean_object* x_265; lean_object* x_266; 
lean_dec(x_140);
x_264 = lean_nat_add(x_146, x_136);
x_265 = lean_nat_add(x_264, x_260);
lean_dec(x_264);
if (lean_is_scalar(x_255)) {
 x_266 = lean_alloc_ctor(0, 5, 0);
} else {
 x_266 = x_255;
}
lean_ctor_set(x_266, 0, x_265);
lean_ctor_set(x_266, 1, x_258);
lean_ctor_set(x_266, 2, x_259);
lean_ctor_set(x_266, 3, x_5);
lean_ctor_set(x_266, 4, x_257);
return x_266;
}
else
{
uint8_t x_267; 
lean_inc(x_139);
lean_inc(x_138);
lean_inc(x_137);
lean_inc(x_136);
x_267 = !lean_is_exclusive(x_5);
if (x_267 == 0)
{
lean_object* x_268; lean_object* x_269; lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; uint8_t x_281; 
x_268 = lean_ctor_get(x_5, 4);
lean_dec(x_268);
x_269 = lean_ctor_get(x_5, 3);
lean_dec(x_269);
x_270 = lean_ctor_get(x_5, 2);
lean_dec(x_270);
x_271 = lean_ctor_get(x_5, 1);
lean_dec(x_271);
x_272 = lean_ctor_get(x_5, 0);
lean_dec(x_272);
x_273 = lean_ctor_get(x_139, 0);
x_274 = lean_ctor_get(x_140, 0);
x_275 = lean_ctor_get(x_140, 1);
x_276 = lean_ctor_get(x_140, 2);
x_277 = lean_ctor_get(x_140, 3);
x_278 = lean_ctor_get(x_140, 4);
x_279 = lean_unsigned_to_nat(2u);
x_280 = lean_nat_mul(x_279, x_273);
x_281 = lean_nat_dec_lt(x_274, x_280);
lean_dec(x_280);
if (x_281 == 0)
{
lean_object* x_282; lean_object* x_283; lean_object* x_284; lean_object* x_285; lean_object* x_286; lean_object* x_287; lean_object* x_298; lean_object* x_299; 
lean_inc(x_278);
lean_inc(x_277);
lean_inc(x_276);
lean_inc(x_275);
lean_free_object(x_5);
if (lean_is_exclusive(x_140)) {
 lean_ctor_release(x_140, 0);
 lean_ctor_release(x_140, 1);
 lean_ctor_release(x_140, 2);
 lean_ctor_release(x_140, 3);
 lean_ctor_release(x_140, 4);
 x_282 = x_140;
} else {
 lean_dec_ref(x_140);
 x_282 = lean_box(0);
}
x_283 = lean_nat_add(x_146, x_136);
lean_dec(x_136);
x_284 = lean_nat_add(x_283, x_260);
lean_dec(x_283);
x_298 = lean_nat_add(x_146, x_273);
if (lean_obj_tag(x_277) == 0)
{
lean_object* x_306; 
x_306 = lean_ctor_get(x_277, 0);
lean_inc(x_306);
x_299 = x_306;
goto block_305;
}
else
{
lean_object* x_307; 
x_307 = lean_unsigned_to_nat(0u);
x_299 = x_307;
goto block_305;
}
block_297:
{
lean_object* x_288; lean_object* x_289; uint8_t x_290; 
x_288 = lean_nat_add(x_286, x_287);
lean_dec(x_287);
lean_dec(x_286);
lean_inc_ref(x_257);
if (lean_is_scalar(x_282)) {
 x_289 = lean_alloc_ctor(0, 5, 0);
} else {
 x_289 = x_282;
}
lean_ctor_set(x_289, 0, x_288);
lean_ctor_set(x_289, 1, x_258);
lean_ctor_set(x_289, 2, x_259);
lean_ctor_set(x_289, 3, x_278);
lean_ctor_set(x_289, 4, x_257);
x_290 = !lean_is_exclusive(x_257);
if (x_290 == 0)
{
lean_object* x_291; lean_object* x_292; lean_object* x_293; lean_object* x_294; lean_object* x_295; 
x_291 = lean_ctor_get(x_257, 4);
lean_dec(x_291);
x_292 = lean_ctor_get(x_257, 3);
lean_dec(x_292);
x_293 = lean_ctor_get(x_257, 2);
lean_dec(x_293);
x_294 = lean_ctor_get(x_257, 1);
lean_dec(x_294);
x_295 = lean_ctor_get(x_257, 0);
lean_dec(x_295);
lean_ctor_set(x_257, 4, x_289);
lean_ctor_set(x_257, 3, x_285);
lean_ctor_set(x_257, 2, x_276);
lean_ctor_set(x_257, 1, x_275);
lean_ctor_set(x_257, 0, x_284);
return x_257;
}
else
{
lean_object* x_296; 
lean_dec(x_257);
x_296 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_296, 0, x_284);
lean_ctor_set(x_296, 1, x_275);
lean_ctor_set(x_296, 2, x_276);
lean_ctor_set(x_296, 3, x_285);
lean_ctor_set(x_296, 4, x_289);
return x_296;
}
}
block_305:
{
lean_object* x_300; lean_object* x_301; lean_object* x_302; 
x_300 = lean_nat_add(x_298, x_299);
lean_dec(x_299);
lean_dec(x_298);
if (lean_is_scalar(x_255)) {
 x_301 = lean_alloc_ctor(0, 5, 0);
} else {
 x_301 = x_255;
}
lean_ctor_set(x_301, 0, x_300);
lean_ctor_set(x_301, 1, x_137);
lean_ctor_set(x_301, 2, x_138);
lean_ctor_set(x_301, 3, x_139);
lean_ctor_set(x_301, 4, x_277);
x_302 = lean_nat_add(x_146, x_260);
if (lean_obj_tag(x_278) == 0)
{
lean_object* x_303; 
x_303 = lean_ctor_get(x_278, 0);
lean_inc(x_303);
x_285 = x_301;
x_286 = x_302;
x_287 = x_303;
goto block_297;
}
else
{
lean_object* x_304; 
x_304 = lean_unsigned_to_nat(0u);
x_285 = x_301;
x_286 = x_302;
x_287 = x_304;
goto block_297;
}
}
}
else
{
lean_object* x_308; lean_object* x_309; lean_object* x_310; lean_object* x_311; lean_object* x_312; 
x_308 = lean_nat_add(x_146, x_136);
lean_dec(x_136);
x_309 = lean_nat_add(x_308, x_260);
lean_dec(x_308);
x_310 = lean_nat_add(x_146, x_260);
x_311 = lean_nat_add(x_310, x_274);
lean_dec(x_310);
if (lean_is_scalar(x_255)) {
 x_312 = lean_alloc_ctor(0, 5, 0);
} else {
 x_312 = x_255;
}
lean_ctor_set(x_312, 0, x_311);
lean_ctor_set(x_312, 1, x_258);
lean_ctor_set(x_312, 2, x_259);
lean_ctor_set(x_312, 3, x_140);
lean_ctor_set(x_312, 4, x_257);
lean_ctor_set(x_5, 4, x_312);
lean_ctor_set(x_5, 0, x_309);
return x_5;
}
}
else
{
lean_object* x_313; lean_object* x_314; lean_object* x_315; lean_object* x_316; lean_object* x_317; lean_object* x_318; lean_object* x_319; lean_object* x_320; uint8_t x_321; 
lean_dec(x_5);
x_313 = lean_ctor_get(x_139, 0);
x_314 = lean_ctor_get(x_140, 0);
x_315 = lean_ctor_get(x_140, 1);
x_316 = lean_ctor_get(x_140, 2);
x_317 = lean_ctor_get(x_140, 3);
x_318 = lean_ctor_get(x_140, 4);
x_319 = lean_unsigned_to_nat(2u);
x_320 = lean_nat_mul(x_319, x_313);
x_321 = lean_nat_dec_lt(x_314, x_320);
lean_dec(x_320);
if (x_321 == 0)
{
lean_object* x_322; lean_object* x_323; lean_object* x_324; lean_object* x_325; lean_object* x_326; lean_object* x_327; lean_object* x_333; lean_object* x_334; 
lean_inc(x_318);
lean_inc(x_317);
lean_inc(x_316);
lean_inc(x_315);
if (lean_is_exclusive(x_140)) {
 lean_ctor_release(x_140, 0);
 lean_ctor_release(x_140, 1);
 lean_ctor_release(x_140, 2);
 lean_ctor_release(x_140, 3);
 lean_ctor_release(x_140, 4);
 x_322 = x_140;
} else {
 lean_dec_ref(x_140);
 x_322 = lean_box(0);
}
x_323 = lean_nat_add(x_146, x_136);
lean_dec(x_136);
x_324 = lean_nat_add(x_323, x_260);
lean_dec(x_323);
x_333 = lean_nat_add(x_146, x_313);
if (lean_obj_tag(x_317) == 0)
{
lean_object* x_341; 
x_341 = lean_ctor_get(x_317, 0);
lean_inc(x_341);
x_334 = x_341;
goto block_340;
}
else
{
lean_object* x_342; 
x_342 = lean_unsigned_to_nat(0u);
x_334 = x_342;
goto block_340;
}
block_332:
{
lean_object* x_328; lean_object* x_329; lean_object* x_330; lean_object* x_331; 
x_328 = lean_nat_add(x_326, x_327);
lean_dec(x_327);
lean_dec(x_326);
lean_inc_ref(x_257);
if (lean_is_scalar(x_322)) {
 x_329 = lean_alloc_ctor(0, 5, 0);
} else {
 x_329 = x_322;
}
lean_ctor_set(x_329, 0, x_328);
lean_ctor_set(x_329, 1, x_258);
lean_ctor_set(x_329, 2, x_259);
lean_ctor_set(x_329, 3, x_318);
lean_ctor_set(x_329, 4, x_257);
if (lean_is_exclusive(x_257)) {
 lean_ctor_release(x_257, 0);
 lean_ctor_release(x_257, 1);
 lean_ctor_release(x_257, 2);
 lean_ctor_release(x_257, 3);
 lean_ctor_release(x_257, 4);
 x_330 = x_257;
} else {
 lean_dec_ref(x_257);
 x_330 = lean_box(0);
}
if (lean_is_scalar(x_330)) {
 x_331 = lean_alloc_ctor(0, 5, 0);
} else {
 x_331 = x_330;
}
lean_ctor_set(x_331, 0, x_324);
lean_ctor_set(x_331, 1, x_315);
lean_ctor_set(x_331, 2, x_316);
lean_ctor_set(x_331, 3, x_325);
lean_ctor_set(x_331, 4, x_329);
return x_331;
}
block_340:
{
lean_object* x_335; lean_object* x_336; lean_object* x_337; 
x_335 = lean_nat_add(x_333, x_334);
lean_dec(x_334);
lean_dec(x_333);
if (lean_is_scalar(x_255)) {
 x_336 = lean_alloc_ctor(0, 5, 0);
} else {
 x_336 = x_255;
}
lean_ctor_set(x_336, 0, x_335);
lean_ctor_set(x_336, 1, x_137);
lean_ctor_set(x_336, 2, x_138);
lean_ctor_set(x_336, 3, x_139);
lean_ctor_set(x_336, 4, x_317);
x_337 = lean_nat_add(x_146, x_260);
if (lean_obj_tag(x_318) == 0)
{
lean_object* x_338; 
x_338 = lean_ctor_get(x_318, 0);
lean_inc(x_338);
x_325 = x_336;
x_326 = x_337;
x_327 = x_338;
goto block_332;
}
else
{
lean_object* x_339; 
x_339 = lean_unsigned_to_nat(0u);
x_325 = x_336;
x_326 = x_337;
x_327 = x_339;
goto block_332;
}
}
}
else
{
lean_object* x_343; lean_object* x_344; lean_object* x_345; lean_object* x_346; lean_object* x_347; lean_object* x_348; 
x_343 = lean_nat_add(x_146, x_136);
lean_dec(x_136);
x_344 = lean_nat_add(x_343, x_260);
lean_dec(x_343);
x_345 = lean_nat_add(x_146, x_260);
x_346 = lean_nat_add(x_345, x_314);
lean_dec(x_345);
if (lean_is_scalar(x_255)) {
 x_347 = lean_alloc_ctor(0, 5, 0);
} else {
 x_347 = x_255;
}
lean_ctor_set(x_347, 0, x_346);
lean_ctor_set(x_347, 1, x_258);
lean_ctor_set(x_347, 2, x_259);
lean_ctor_set(x_347, 3, x_140);
lean_ctor_set(x_347, 4, x_257);
x_348 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_348, 0, x_344);
lean_ctor_set(x_348, 1, x_137);
lean_ctor_set(x_348, 2, x_138);
lean_ctor_set(x_348, 3, x_139);
lean_ctor_set(x_348, 4, x_347);
return x_348;
}
}
}
}
else
{
if (lean_obj_tag(x_139) == 0)
{
uint8_t x_349; 
lean_inc_ref(x_139);
lean_inc(x_138);
lean_inc(x_137);
lean_inc(x_136);
x_349 = !lean_is_exclusive(x_5);
if (x_349 == 0)
{
lean_object* x_350; lean_object* x_351; lean_object* x_352; lean_object* x_353; lean_object* x_354; 
x_350 = lean_ctor_get(x_5, 4);
lean_dec(x_350);
x_351 = lean_ctor_get(x_5, 3);
lean_dec(x_351);
x_352 = lean_ctor_get(x_5, 2);
lean_dec(x_352);
x_353 = lean_ctor_get(x_5, 1);
lean_dec(x_353);
x_354 = lean_ctor_get(x_5, 0);
lean_dec(x_354);
if (lean_obj_tag(x_140) == 0)
{
lean_object* x_355; lean_object* x_356; lean_object* x_357; lean_object* x_358; lean_object* x_359; lean_object* x_360; 
x_355 = lean_ctor_get(x_256, 0);
lean_inc(x_355);
x_356 = lean_ctor_get(x_256, 1);
lean_inc(x_356);
lean_dec_ref(x_256);
x_357 = lean_ctor_get(x_140, 0);
x_358 = lean_nat_add(x_146, x_136);
lean_dec(x_136);
x_359 = lean_nat_add(x_146, x_357);
if (lean_is_scalar(x_255)) {
 x_360 = lean_alloc_ctor(0, 5, 0);
} else {
 x_360 = x_255;
}
lean_ctor_set(x_360, 0, x_359);
lean_ctor_set(x_360, 1, x_355);
lean_ctor_set(x_360, 2, x_356);
lean_ctor_set(x_360, 3, x_140);
lean_ctor_set(x_360, 4, x_257);
lean_ctor_set(x_5, 4, x_360);
lean_ctor_set(x_5, 0, x_358);
return x_5;
}
else
{
lean_object* x_361; lean_object* x_362; lean_object* x_363; lean_object* x_364; 
lean_dec(x_136);
x_361 = lean_ctor_get(x_256, 0);
lean_inc(x_361);
x_362 = lean_ctor_get(x_256, 1);
lean_inc(x_362);
lean_dec_ref(x_256);
x_363 = lean_unsigned_to_nat(3u);
if (lean_is_scalar(x_255)) {
 x_364 = lean_alloc_ctor(0, 5, 0);
} else {
 x_364 = x_255;
}
lean_ctor_set(x_364, 0, x_146);
lean_ctor_set(x_364, 1, x_361);
lean_ctor_set(x_364, 2, x_362);
lean_ctor_set(x_364, 3, x_140);
lean_ctor_set(x_364, 4, x_140);
lean_ctor_set(x_5, 4, x_364);
lean_ctor_set(x_5, 0, x_363);
return x_5;
}
}
else
{
lean_dec(x_5);
if (lean_obj_tag(x_140) == 0)
{
lean_object* x_365; lean_object* x_366; lean_object* x_367; lean_object* x_368; lean_object* x_369; lean_object* x_370; lean_object* x_371; 
x_365 = lean_ctor_get(x_256, 0);
lean_inc(x_365);
x_366 = lean_ctor_get(x_256, 1);
lean_inc(x_366);
lean_dec_ref(x_256);
x_367 = lean_ctor_get(x_140, 0);
x_368 = lean_nat_add(x_146, x_136);
lean_dec(x_136);
x_369 = lean_nat_add(x_146, x_367);
if (lean_is_scalar(x_255)) {
 x_370 = lean_alloc_ctor(0, 5, 0);
} else {
 x_370 = x_255;
}
lean_ctor_set(x_370, 0, x_369);
lean_ctor_set(x_370, 1, x_365);
lean_ctor_set(x_370, 2, x_366);
lean_ctor_set(x_370, 3, x_140);
lean_ctor_set(x_370, 4, x_257);
x_371 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_371, 0, x_368);
lean_ctor_set(x_371, 1, x_137);
lean_ctor_set(x_371, 2, x_138);
lean_ctor_set(x_371, 3, x_139);
lean_ctor_set(x_371, 4, x_370);
return x_371;
}
else
{
lean_object* x_372; lean_object* x_373; lean_object* x_374; lean_object* x_375; lean_object* x_376; 
lean_dec(x_136);
x_372 = lean_ctor_get(x_256, 0);
lean_inc(x_372);
x_373 = lean_ctor_get(x_256, 1);
lean_inc(x_373);
lean_dec_ref(x_256);
x_374 = lean_unsigned_to_nat(3u);
if (lean_is_scalar(x_255)) {
 x_375 = lean_alloc_ctor(0, 5, 0);
} else {
 x_375 = x_255;
}
lean_ctor_set(x_375, 0, x_146);
lean_ctor_set(x_375, 1, x_372);
lean_ctor_set(x_375, 2, x_373);
lean_ctor_set(x_375, 3, x_140);
lean_ctor_set(x_375, 4, x_140);
x_376 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_376, 0, x_374);
lean_ctor_set(x_376, 1, x_137);
lean_ctor_set(x_376, 2, x_138);
lean_ctor_set(x_376, 3, x_139);
lean_ctor_set(x_376, 4, x_375);
return x_376;
}
}
}
else
{
if (lean_obj_tag(x_140) == 0)
{
uint8_t x_377; 
lean_inc(x_139);
lean_inc(x_138);
lean_inc(x_137);
x_377 = !lean_is_exclusive(x_5);
if (x_377 == 0)
{
lean_object* x_378; lean_object* x_379; lean_object* x_380; lean_object* x_381; lean_object* x_382; lean_object* x_383; lean_object* x_384; uint8_t x_385; 
x_378 = lean_ctor_get(x_5, 4);
lean_dec(x_378);
x_379 = lean_ctor_get(x_5, 3);
lean_dec(x_379);
x_380 = lean_ctor_get(x_5, 2);
lean_dec(x_380);
x_381 = lean_ctor_get(x_5, 1);
lean_dec(x_381);
x_382 = lean_ctor_get(x_5, 0);
lean_dec(x_382);
x_383 = lean_ctor_get(x_256, 0);
lean_inc(x_383);
x_384 = lean_ctor_get(x_256, 1);
lean_inc(x_384);
lean_dec_ref(x_256);
x_385 = !lean_is_exclusive(x_140);
if (x_385 == 0)
{
lean_object* x_386; lean_object* x_387; lean_object* x_388; lean_object* x_389; lean_object* x_390; lean_object* x_391; lean_object* x_392; 
x_386 = lean_ctor_get(x_140, 1);
x_387 = lean_ctor_get(x_140, 2);
x_388 = lean_ctor_get(x_140, 4);
lean_dec(x_388);
x_389 = lean_ctor_get(x_140, 3);
lean_dec(x_389);
x_390 = lean_ctor_get(x_140, 0);
lean_dec(x_390);
x_391 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_140, 4, x_139);
lean_ctor_set(x_140, 3, x_139);
lean_ctor_set(x_140, 2, x_138);
lean_ctor_set(x_140, 1, x_137);
lean_ctor_set(x_140, 0, x_146);
if (lean_is_scalar(x_255)) {
 x_392 = lean_alloc_ctor(0, 5, 0);
} else {
 x_392 = x_255;
}
lean_ctor_set(x_392, 0, x_146);
lean_ctor_set(x_392, 1, x_383);
lean_ctor_set(x_392, 2, x_384);
lean_ctor_set(x_392, 3, x_139);
lean_ctor_set(x_392, 4, x_139);
lean_ctor_set(x_5, 4, x_392);
lean_ctor_set(x_5, 3, x_140);
lean_ctor_set(x_5, 2, x_387);
lean_ctor_set(x_5, 1, x_386);
lean_ctor_set(x_5, 0, x_391);
return x_5;
}
else
{
lean_object* x_393; lean_object* x_394; lean_object* x_395; lean_object* x_396; lean_object* x_397; 
x_393 = lean_ctor_get(x_140, 1);
x_394 = lean_ctor_get(x_140, 2);
lean_inc(x_394);
lean_inc(x_393);
lean_dec(x_140);
x_395 = lean_unsigned_to_nat(3u);
x_396 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_396, 0, x_146);
lean_ctor_set(x_396, 1, x_137);
lean_ctor_set(x_396, 2, x_138);
lean_ctor_set(x_396, 3, x_139);
lean_ctor_set(x_396, 4, x_139);
if (lean_is_scalar(x_255)) {
 x_397 = lean_alloc_ctor(0, 5, 0);
} else {
 x_397 = x_255;
}
lean_ctor_set(x_397, 0, x_146);
lean_ctor_set(x_397, 1, x_383);
lean_ctor_set(x_397, 2, x_384);
lean_ctor_set(x_397, 3, x_139);
lean_ctor_set(x_397, 4, x_139);
lean_ctor_set(x_5, 4, x_397);
lean_ctor_set(x_5, 3, x_396);
lean_ctor_set(x_5, 2, x_394);
lean_ctor_set(x_5, 1, x_393);
lean_ctor_set(x_5, 0, x_395);
return x_5;
}
}
else
{
lean_object* x_398; lean_object* x_399; lean_object* x_400; lean_object* x_401; lean_object* x_402; lean_object* x_403; lean_object* x_404; lean_object* x_405; lean_object* x_406; 
lean_dec(x_5);
x_398 = lean_ctor_get(x_256, 0);
lean_inc(x_398);
x_399 = lean_ctor_get(x_256, 1);
lean_inc(x_399);
lean_dec_ref(x_256);
x_400 = lean_ctor_get(x_140, 1);
lean_inc(x_400);
x_401 = lean_ctor_get(x_140, 2);
lean_inc(x_401);
if (lean_is_exclusive(x_140)) {
 lean_ctor_release(x_140, 0);
 lean_ctor_release(x_140, 1);
 lean_ctor_release(x_140, 2);
 lean_ctor_release(x_140, 3);
 lean_ctor_release(x_140, 4);
 x_402 = x_140;
} else {
 lean_dec_ref(x_140);
 x_402 = lean_box(0);
}
x_403 = lean_unsigned_to_nat(3u);
if (lean_is_scalar(x_402)) {
 x_404 = lean_alloc_ctor(0, 5, 0);
} else {
 x_404 = x_402;
}
lean_ctor_set(x_404, 0, x_146);
lean_ctor_set(x_404, 1, x_137);
lean_ctor_set(x_404, 2, x_138);
lean_ctor_set(x_404, 3, x_139);
lean_ctor_set(x_404, 4, x_139);
if (lean_is_scalar(x_255)) {
 x_405 = lean_alloc_ctor(0, 5, 0);
} else {
 x_405 = x_255;
}
lean_ctor_set(x_405, 0, x_146);
lean_ctor_set(x_405, 1, x_398);
lean_ctor_set(x_405, 2, x_399);
lean_ctor_set(x_405, 3, x_139);
lean_ctor_set(x_405, 4, x_139);
x_406 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_406, 0, x_403);
lean_ctor_set(x_406, 1, x_400);
lean_ctor_set(x_406, 2, x_401);
lean_ctor_set(x_406, 3, x_404);
lean_ctor_set(x_406, 4, x_405);
return x_406;
}
}
else
{
lean_object* x_407; lean_object* x_408; lean_object* x_409; lean_object* x_410; 
x_407 = lean_ctor_get(x_256, 0);
lean_inc(x_407);
x_408 = lean_ctor_get(x_256, 1);
lean_inc(x_408);
lean_dec_ref(x_256);
x_409 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_255)) {
 x_410 = lean_alloc_ctor(0, 5, 0);
} else {
 x_410 = x_255;
}
lean_ctor_set(x_410, 0, x_409);
lean_ctor_set(x_410, 1, x_407);
lean_ctor_set(x_410, 2, x_408);
lean_ctor_set(x_410, 3, x_5);
lean_ctor_set(x_410, 4, x_140);
return x_410;
}
}
}
}
}
else
{
return x_5;
}
}
else
{
return x_6;
}
}
}
else
{
lean_object* x_411; lean_object* x_412; 
x_411 = l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_mainLoop_spec__0___redArg(x_1, x_5);
x_412 = lean_unsigned_to_nat(1u);
if (lean_obj_tag(x_411) == 0)
{
if (lean_obj_tag(x_6) == 0)
{
lean_object* x_413; lean_object* x_414; lean_object* x_415; lean_object* x_416; lean_object* x_417; lean_object* x_418; lean_object* x_419; lean_object* x_420; uint8_t x_421; 
x_413 = lean_ctor_get(x_411, 0);
lean_inc(x_413);
x_414 = lean_ctor_get(x_6, 0);
x_415 = lean_ctor_get(x_6, 1);
x_416 = lean_ctor_get(x_6, 2);
x_417 = lean_ctor_get(x_6, 3);
lean_inc(x_417);
x_418 = lean_ctor_get(x_6, 4);
x_419 = lean_unsigned_to_nat(3u);
x_420 = lean_nat_mul(x_419, x_413);
x_421 = lean_nat_dec_lt(x_420, x_414);
lean_dec(x_420);
if (x_421 == 0)
{
lean_object* x_422; lean_object* x_423; lean_object* x_424; 
lean_dec(x_417);
x_422 = lean_nat_add(x_412, x_413);
lean_dec(x_413);
x_423 = lean_nat_add(x_422, x_414);
lean_dec(x_422);
if (lean_is_scalar(x_7)) {
 x_424 = lean_alloc_ctor(0, 5, 0);
} else {
 x_424 = x_7;
}
lean_ctor_set(x_424, 0, x_423);
lean_ctor_set(x_424, 1, x_3);
lean_ctor_set(x_424, 2, x_4);
lean_ctor_set(x_424, 3, x_411);
lean_ctor_set(x_424, 4, x_6);
return x_424;
}
else
{
lean_object* x_425; lean_object* x_426; lean_object* x_427; lean_object* x_428; lean_object* x_429; lean_object* x_430; lean_object* x_431; lean_object* x_432; lean_object* x_433; uint8_t x_434; 
lean_inc(x_418);
lean_inc(x_416);
lean_inc(x_415);
lean_inc(x_414);
if (lean_is_exclusive(x_6)) {
 lean_ctor_release(x_6, 0);
 lean_ctor_release(x_6, 1);
 lean_ctor_release(x_6, 2);
 lean_ctor_release(x_6, 3);
 lean_ctor_release(x_6, 4);
 x_425 = x_6;
} else {
 lean_dec_ref(x_6);
 x_425 = lean_box(0);
}
x_426 = lean_ctor_get(x_417, 0);
x_427 = lean_ctor_get(x_417, 1);
x_428 = lean_ctor_get(x_417, 2);
x_429 = lean_ctor_get(x_417, 3);
x_430 = lean_ctor_get(x_417, 4);
x_431 = lean_ctor_get(x_418, 0);
x_432 = lean_unsigned_to_nat(2u);
x_433 = lean_nat_mul(x_432, x_431);
x_434 = lean_nat_dec_lt(x_426, x_433);
lean_dec(x_433);
if (x_434 == 0)
{
lean_object* x_435; lean_object* x_436; lean_object* x_437; lean_object* x_438; lean_object* x_439; lean_object* x_440; lean_object* x_445; 
lean_inc(x_430);
lean_inc(x_429);
lean_inc(x_428);
lean_inc(x_427);
if (lean_is_exclusive(x_417)) {
 lean_ctor_release(x_417, 0);
 lean_ctor_release(x_417, 1);
 lean_ctor_release(x_417, 2);
 lean_ctor_release(x_417, 3);
 lean_ctor_release(x_417, 4);
 x_435 = x_417;
} else {
 lean_dec_ref(x_417);
 x_435 = lean_box(0);
}
x_436 = lean_nat_add(x_412, x_413);
lean_dec(x_413);
x_437 = lean_nat_add(x_436, x_414);
lean_dec(x_414);
if (lean_obj_tag(x_429) == 0)
{
lean_object* x_452; 
x_452 = lean_ctor_get(x_429, 0);
lean_inc(x_452);
x_445 = x_452;
goto block_451;
}
else
{
lean_object* x_453; 
x_453 = lean_unsigned_to_nat(0u);
x_445 = x_453;
goto block_451;
}
block_444:
{
lean_object* x_441; lean_object* x_442; lean_object* x_443; 
x_441 = lean_nat_add(x_439, x_440);
lean_dec(x_440);
lean_dec(x_439);
if (lean_is_scalar(x_435)) {
 x_442 = lean_alloc_ctor(0, 5, 0);
} else {
 x_442 = x_435;
}
lean_ctor_set(x_442, 0, x_441);
lean_ctor_set(x_442, 1, x_415);
lean_ctor_set(x_442, 2, x_416);
lean_ctor_set(x_442, 3, x_430);
lean_ctor_set(x_442, 4, x_418);
if (lean_is_scalar(x_425)) {
 x_443 = lean_alloc_ctor(0, 5, 0);
} else {
 x_443 = x_425;
}
lean_ctor_set(x_443, 0, x_437);
lean_ctor_set(x_443, 1, x_427);
lean_ctor_set(x_443, 2, x_428);
lean_ctor_set(x_443, 3, x_438);
lean_ctor_set(x_443, 4, x_442);
return x_443;
}
block_451:
{
lean_object* x_446; lean_object* x_447; lean_object* x_448; 
x_446 = lean_nat_add(x_436, x_445);
lean_dec(x_445);
lean_dec(x_436);
if (lean_is_scalar(x_7)) {
 x_447 = lean_alloc_ctor(0, 5, 0);
} else {
 x_447 = x_7;
}
lean_ctor_set(x_447, 0, x_446);
lean_ctor_set(x_447, 1, x_3);
lean_ctor_set(x_447, 2, x_4);
lean_ctor_set(x_447, 3, x_411);
lean_ctor_set(x_447, 4, x_429);
x_448 = lean_nat_add(x_412, x_431);
if (lean_obj_tag(x_430) == 0)
{
lean_object* x_449; 
x_449 = lean_ctor_get(x_430, 0);
lean_inc(x_449);
x_438 = x_447;
x_439 = x_448;
x_440 = x_449;
goto block_444;
}
else
{
lean_object* x_450; 
x_450 = lean_unsigned_to_nat(0u);
x_438 = x_447;
x_439 = x_448;
x_440 = x_450;
goto block_444;
}
}
}
else
{
lean_object* x_454; lean_object* x_455; lean_object* x_456; lean_object* x_457; uint8_t x_458; 
lean_dec(x_7);
x_454 = lean_nat_add(x_412, x_413);
lean_dec(x_413);
x_455 = lean_nat_add(x_454, x_414);
lean_dec(x_414);
x_456 = lean_nat_add(x_454, x_426);
lean_dec(x_454);
lean_inc_ref(x_411);
if (lean_is_scalar(x_425)) {
 x_457 = lean_alloc_ctor(0, 5, 0);
} else {
 x_457 = x_425;
}
lean_ctor_set(x_457, 0, x_456);
lean_ctor_set(x_457, 1, x_3);
lean_ctor_set(x_457, 2, x_4);
lean_ctor_set(x_457, 3, x_411);
lean_ctor_set(x_457, 4, x_417);
x_458 = !lean_is_exclusive(x_411);
if (x_458 == 0)
{
lean_object* x_459; lean_object* x_460; lean_object* x_461; lean_object* x_462; lean_object* x_463; 
x_459 = lean_ctor_get(x_411, 4);
lean_dec(x_459);
x_460 = lean_ctor_get(x_411, 3);
lean_dec(x_460);
x_461 = lean_ctor_get(x_411, 2);
lean_dec(x_461);
x_462 = lean_ctor_get(x_411, 1);
lean_dec(x_462);
x_463 = lean_ctor_get(x_411, 0);
lean_dec(x_463);
lean_ctor_set(x_411, 4, x_418);
lean_ctor_set(x_411, 3, x_457);
lean_ctor_set(x_411, 2, x_416);
lean_ctor_set(x_411, 1, x_415);
lean_ctor_set(x_411, 0, x_455);
return x_411;
}
else
{
lean_object* x_464; 
lean_dec(x_411);
x_464 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_464, 0, x_455);
lean_ctor_set(x_464, 1, x_415);
lean_ctor_set(x_464, 2, x_416);
lean_ctor_set(x_464, 3, x_457);
lean_ctor_set(x_464, 4, x_418);
return x_464;
}
}
}
}
else
{
lean_object* x_465; lean_object* x_466; lean_object* x_467; 
x_465 = lean_ctor_get(x_411, 0);
lean_inc(x_465);
x_466 = lean_nat_add(x_412, x_465);
lean_dec(x_465);
if (lean_is_scalar(x_7)) {
 x_467 = lean_alloc_ctor(0, 5, 0);
} else {
 x_467 = x_7;
}
lean_ctor_set(x_467, 0, x_466);
lean_ctor_set(x_467, 1, x_3);
lean_ctor_set(x_467, 2, x_4);
lean_ctor_set(x_467, 3, x_411);
lean_ctor_set(x_467, 4, x_6);
return x_467;
}
}
else
{
if (lean_obj_tag(x_6) == 0)
{
lean_object* x_468; 
x_468 = lean_ctor_get(x_6, 3);
lean_inc(x_468);
if (lean_obj_tag(x_468) == 0)
{
lean_object* x_469; 
x_469 = lean_ctor_get(x_6, 4);
lean_inc(x_469);
if (lean_obj_tag(x_469) == 0)
{
uint8_t x_470; 
x_470 = !lean_is_exclusive(x_6);
if (x_470 == 0)
{
lean_object* x_471; lean_object* x_472; lean_object* x_473; lean_object* x_474; lean_object* x_475; lean_object* x_476; lean_object* x_477; lean_object* x_478; lean_object* x_479; 
x_471 = lean_ctor_get(x_6, 0);
x_472 = lean_ctor_get(x_6, 1);
x_473 = lean_ctor_get(x_6, 2);
x_474 = lean_ctor_get(x_6, 4);
lean_dec(x_474);
x_475 = lean_ctor_get(x_6, 3);
lean_dec(x_475);
x_476 = lean_ctor_get(x_468, 0);
x_477 = lean_nat_add(x_412, x_471);
lean_dec(x_471);
x_478 = lean_nat_add(x_412, x_476);
lean_ctor_set(x_6, 4, x_468);
lean_ctor_set(x_6, 3, x_411);
lean_ctor_set(x_6, 2, x_4);
lean_ctor_set(x_6, 1, x_3);
lean_ctor_set(x_6, 0, x_478);
if (lean_is_scalar(x_7)) {
 x_479 = lean_alloc_ctor(0, 5, 0);
} else {
 x_479 = x_7;
}
lean_ctor_set(x_479, 0, x_477);
lean_ctor_set(x_479, 1, x_472);
lean_ctor_set(x_479, 2, x_473);
lean_ctor_set(x_479, 3, x_6);
lean_ctor_set(x_479, 4, x_469);
return x_479;
}
else
{
lean_object* x_480; lean_object* x_481; lean_object* x_482; lean_object* x_483; lean_object* x_484; lean_object* x_485; lean_object* x_486; lean_object* x_487; 
x_480 = lean_ctor_get(x_6, 0);
x_481 = lean_ctor_get(x_6, 1);
x_482 = lean_ctor_get(x_6, 2);
lean_inc(x_482);
lean_inc(x_481);
lean_inc(x_480);
lean_dec(x_6);
x_483 = lean_ctor_get(x_468, 0);
x_484 = lean_nat_add(x_412, x_480);
lean_dec(x_480);
x_485 = lean_nat_add(x_412, x_483);
x_486 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_486, 0, x_485);
lean_ctor_set(x_486, 1, x_3);
lean_ctor_set(x_486, 2, x_4);
lean_ctor_set(x_486, 3, x_411);
lean_ctor_set(x_486, 4, x_468);
if (lean_is_scalar(x_7)) {
 x_487 = lean_alloc_ctor(0, 5, 0);
} else {
 x_487 = x_7;
}
lean_ctor_set(x_487, 0, x_484);
lean_ctor_set(x_487, 1, x_481);
lean_ctor_set(x_487, 2, x_482);
lean_ctor_set(x_487, 3, x_486);
lean_ctor_set(x_487, 4, x_469);
return x_487;
}
}
else
{
uint8_t x_488; 
x_488 = !lean_is_exclusive(x_6);
if (x_488 == 0)
{
lean_object* x_489; lean_object* x_490; lean_object* x_491; uint8_t x_492; 
x_489 = lean_ctor_get(x_6, 4);
lean_dec(x_489);
x_490 = lean_ctor_get(x_6, 3);
lean_dec(x_490);
x_491 = lean_ctor_get(x_6, 0);
lean_dec(x_491);
x_492 = !lean_is_exclusive(x_468);
if (x_492 == 0)
{
lean_object* x_493; lean_object* x_494; lean_object* x_495; lean_object* x_496; lean_object* x_497; lean_object* x_498; lean_object* x_499; 
x_493 = lean_ctor_get(x_468, 1);
x_494 = lean_ctor_get(x_468, 2);
x_495 = lean_ctor_get(x_468, 4);
lean_dec(x_495);
x_496 = lean_ctor_get(x_468, 3);
lean_dec(x_496);
x_497 = lean_ctor_get(x_468, 0);
lean_dec(x_497);
x_498 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_468, 4, x_469);
lean_ctor_set(x_468, 3, x_469);
lean_ctor_set(x_468, 2, x_4);
lean_ctor_set(x_468, 1, x_3);
lean_ctor_set(x_468, 0, x_412);
lean_ctor_set(x_6, 3, x_469);
lean_ctor_set(x_6, 0, x_412);
if (lean_is_scalar(x_7)) {
 x_499 = lean_alloc_ctor(0, 5, 0);
} else {
 x_499 = x_7;
}
lean_ctor_set(x_499, 0, x_498);
lean_ctor_set(x_499, 1, x_493);
lean_ctor_set(x_499, 2, x_494);
lean_ctor_set(x_499, 3, x_468);
lean_ctor_set(x_499, 4, x_6);
return x_499;
}
else
{
lean_object* x_500; lean_object* x_501; lean_object* x_502; lean_object* x_503; lean_object* x_504; 
x_500 = lean_ctor_get(x_468, 1);
x_501 = lean_ctor_get(x_468, 2);
lean_inc(x_501);
lean_inc(x_500);
lean_dec(x_468);
x_502 = lean_unsigned_to_nat(3u);
x_503 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_503, 0, x_412);
lean_ctor_set(x_503, 1, x_3);
lean_ctor_set(x_503, 2, x_4);
lean_ctor_set(x_503, 3, x_469);
lean_ctor_set(x_503, 4, x_469);
lean_ctor_set(x_6, 3, x_469);
lean_ctor_set(x_6, 0, x_412);
if (lean_is_scalar(x_7)) {
 x_504 = lean_alloc_ctor(0, 5, 0);
} else {
 x_504 = x_7;
}
lean_ctor_set(x_504, 0, x_502);
lean_ctor_set(x_504, 1, x_500);
lean_ctor_set(x_504, 2, x_501);
lean_ctor_set(x_504, 3, x_503);
lean_ctor_set(x_504, 4, x_6);
return x_504;
}
}
else
{
lean_object* x_505; lean_object* x_506; lean_object* x_507; lean_object* x_508; lean_object* x_509; lean_object* x_510; lean_object* x_511; lean_object* x_512; lean_object* x_513; 
x_505 = lean_ctor_get(x_6, 1);
x_506 = lean_ctor_get(x_6, 2);
lean_inc(x_506);
lean_inc(x_505);
lean_dec(x_6);
x_507 = lean_ctor_get(x_468, 1);
lean_inc(x_507);
x_508 = lean_ctor_get(x_468, 2);
lean_inc(x_508);
if (lean_is_exclusive(x_468)) {
 lean_ctor_release(x_468, 0);
 lean_ctor_release(x_468, 1);
 lean_ctor_release(x_468, 2);
 lean_ctor_release(x_468, 3);
 lean_ctor_release(x_468, 4);
 x_509 = x_468;
} else {
 lean_dec_ref(x_468);
 x_509 = lean_box(0);
}
x_510 = lean_unsigned_to_nat(3u);
if (lean_is_scalar(x_509)) {
 x_511 = lean_alloc_ctor(0, 5, 0);
} else {
 x_511 = x_509;
}
lean_ctor_set(x_511, 0, x_412);
lean_ctor_set(x_511, 1, x_3);
lean_ctor_set(x_511, 2, x_4);
lean_ctor_set(x_511, 3, x_469);
lean_ctor_set(x_511, 4, x_469);
x_512 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_512, 0, x_412);
lean_ctor_set(x_512, 1, x_505);
lean_ctor_set(x_512, 2, x_506);
lean_ctor_set(x_512, 3, x_469);
lean_ctor_set(x_512, 4, x_469);
if (lean_is_scalar(x_7)) {
 x_513 = lean_alloc_ctor(0, 5, 0);
} else {
 x_513 = x_7;
}
lean_ctor_set(x_513, 0, x_510);
lean_ctor_set(x_513, 1, x_507);
lean_ctor_set(x_513, 2, x_508);
lean_ctor_set(x_513, 3, x_511);
lean_ctor_set(x_513, 4, x_512);
return x_513;
}
}
}
else
{
lean_object* x_514; 
x_514 = lean_ctor_get(x_6, 4);
lean_inc(x_514);
if (lean_obj_tag(x_514) == 0)
{
uint8_t x_515; 
x_515 = !lean_is_exclusive(x_6);
if (x_515 == 0)
{
lean_object* x_516; lean_object* x_517; lean_object* x_518; lean_object* x_519; lean_object* x_520; lean_object* x_521; lean_object* x_522; 
x_516 = lean_ctor_get(x_6, 1);
x_517 = lean_ctor_get(x_6, 2);
x_518 = lean_ctor_get(x_6, 4);
lean_dec(x_518);
x_519 = lean_ctor_get(x_6, 3);
lean_dec(x_519);
x_520 = lean_ctor_get(x_6, 0);
lean_dec(x_520);
x_521 = lean_unsigned_to_nat(3u);
lean_ctor_set(x_6, 4, x_468);
lean_ctor_set(x_6, 2, x_4);
lean_ctor_set(x_6, 1, x_3);
lean_ctor_set(x_6, 0, x_412);
if (lean_is_scalar(x_7)) {
 x_522 = lean_alloc_ctor(0, 5, 0);
} else {
 x_522 = x_7;
}
lean_ctor_set(x_522, 0, x_521);
lean_ctor_set(x_522, 1, x_516);
lean_ctor_set(x_522, 2, x_517);
lean_ctor_set(x_522, 3, x_6);
lean_ctor_set(x_522, 4, x_514);
return x_522;
}
else
{
lean_object* x_523; lean_object* x_524; lean_object* x_525; lean_object* x_526; lean_object* x_527; 
x_523 = lean_ctor_get(x_6, 1);
x_524 = lean_ctor_get(x_6, 2);
lean_inc(x_524);
lean_inc(x_523);
lean_dec(x_6);
x_525 = lean_unsigned_to_nat(3u);
x_526 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_526, 0, x_412);
lean_ctor_set(x_526, 1, x_3);
lean_ctor_set(x_526, 2, x_4);
lean_ctor_set(x_526, 3, x_468);
lean_ctor_set(x_526, 4, x_468);
if (lean_is_scalar(x_7)) {
 x_527 = lean_alloc_ctor(0, 5, 0);
} else {
 x_527 = x_7;
}
lean_ctor_set(x_527, 0, x_525);
lean_ctor_set(x_527, 1, x_523);
lean_ctor_set(x_527, 2, x_524);
lean_ctor_set(x_527, 3, x_526);
lean_ctor_set(x_527, 4, x_514);
return x_527;
}
}
else
{
uint8_t x_528; 
x_528 = !lean_is_exclusive(x_6);
if (x_528 == 0)
{
lean_object* x_529; lean_object* x_530; lean_object* x_531; lean_object* x_532; 
x_529 = lean_ctor_get(x_6, 4);
lean_dec(x_529);
x_530 = lean_ctor_get(x_6, 3);
lean_dec(x_530);
lean_ctor_set(x_6, 3, x_514);
x_531 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_7)) {
 x_532 = lean_alloc_ctor(0, 5, 0);
} else {
 x_532 = x_7;
}
lean_ctor_set(x_532, 0, x_531);
lean_ctor_set(x_532, 1, x_3);
lean_ctor_set(x_532, 2, x_4);
lean_ctor_set(x_532, 3, x_514);
lean_ctor_set(x_532, 4, x_6);
return x_532;
}
else
{
lean_object* x_533; lean_object* x_534; lean_object* x_535; lean_object* x_536; lean_object* x_537; lean_object* x_538; 
x_533 = lean_ctor_get(x_6, 0);
x_534 = lean_ctor_get(x_6, 1);
x_535 = lean_ctor_get(x_6, 2);
lean_inc(x_535);
lean_inc(x_534);
lean_inc(x_533);
lean_dec(x_6);
x_536 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_536, 0, x_533);
lean_ctor_set(x_536, 1, x_534);
lean_ctor_set(x_536, 2, x_535);
lean_ctor_set(x_536, 3, x_514);
lean_ctor_set(x_536, 4, x_514);
x_537 = lean_unsigned_to_nat(2u);
if (lean_is_scalar(x_7)) {
 x_538 = lean_alloc_ctor(0, 5, 0);
} else {
 x_538 = x_7;
}
lean_ctor_set(x_538, 0, x_537);
lean_ctor_set(x_538, 1, x_3);
lean_ctor_set(x_538, 2, x_4);
lean_ctor_set(x_538, 3, x_514);
lean_ctor_set(x_538, 4, x_536);
return x_538;
}
}
}
}
else
{
lean_object* x_539; 
if (lean_is_scalar(x_7)) {
 x_539 = lean_alloc_ctor(0, 5, 0);
} else {
 x_539 = x_7;
}
lean_ctor_set(x_539, 0, x_412);
lean_ctor_set(x_539, 1, x_3);
lean_ctor_set(x_539, 2, x_4);
lean_ctor_set(x_539, 3, x_6);
lean_ctor_set(x_539, 4, x_6);
return x_539;
}
}
}
}
else
{
return x_2;
}
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_mainLoop_spec__0(lean_object* x_1, uint64_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_mainLoop_spec__0___redArg(x_2, x_3);
return x_5;
}
}
static lean_object* _init_l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Failed responding to request ", 29, 29);
return x_1;
}
}
static lean_object* _init_l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked(": ", 2, 2);
return x_1;
}
}
static lean_object* _init_l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("\"", 1, 1);
return x_1;
}
}
static lean_object* _init_l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__3() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("null", 4, 4);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; 
x_4 = lean_ctor_get(x_2, 1);
lean_inc(x_4);
x_5 = lean_ctor_get(x_2, 2);
lean_inc(x_5);
x_6 = lean_ctor_get(x_2, 3);
lean_inc(x_6);
x_7 = lean_ctor_get(x_2, 4);
lean_inc(x_7);
lean_dec_ref(x_2);
x_8 = l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg(x_1, x_6);
if (lean_obj_tag(x_8) == 0)
{
lean_object* x_9; lean_object* x_10; lean_object* x_14; uint8_t x_15; 
x_9 = lean_ctor_get(x_8, 0);
lean_inc(x_9);
lean_dec_ref(x_8);
x_14 = lean_ctor_get(x_5, 0);
lean_inc_ref(x_14);
lean_dec(x_5);
x_15 = l_Lean_Server_ServerTask_hasFinished___redArg(x_14);
if (x_15 == 0)
{
lean_dec_ref(x_14);
lean_dec(x_4);
x_1 = x_9;
x_2 = x_7;
goto _start;
}
else
{
lean_object* x_17; 
x_17 = lean_io_wait(x_14);
if (lean_obj_tag(x_17) == 0)
{
lean_object* x_18; lean_object* x_19; lean_object* x_20; 
x_18 = lean_ctor_get(x_17, 0);
lean_inc(x_18);
lean_dec_ref(x_17);
x_19 = l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__0;
switch (lean_obj_tag(x_4)) {
case 0:
{
lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; 
x_31 = lean_ctor_get(x_4, 0);
x_32 = l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__2;
x_33 = lean_string_append(x_32, x_31);
x_34 = lean_string_append(x_33, x_32);
x_20 = x_34;
goto block_30;
}
case 1:
{
lean_object* x_35; lean_object* x_36; 
x_35 = lean_ctor_get(x_4, 0);
lean_inc_ref(x_35);
x_36 = l_Lean_JsonNumber_toString(x_35);
x_20 = x_36;
goto block_30;
}
default: 
{
lean_object* x_37; 
x_37 = l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__3;
x_20 = x_37;
goto block_30;
}
}
block_30:
{
lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; 
x_21 = lean_string_append(x_19, x_20);
lean_dec_ref(x_20);
x_22 = l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__1;
x_23 = lean_string_append(x_21, x_22);
x_24 = lean_io_error_to_string(x_18);
x_25 = lean_string_append(x_23, x_24);
lean_dec_ref(x_24);
x_26 = l_IO_throwServerError___redArg(x_25);
if (lean_obj_tag(x_26) == 0)
{
lean_dec_ref(x_26);
x_10 = lean_box(0);
goto block_13;
}
else
{
uint8_t x_27; 
lean_dec(x_9);
lean_dec(x_7);
lean_dec(x_4);
x_27 = !lean_is_exclusive(x_26);
if (x_27 == 0)
{
return x_26;
}
else
{
lean_object* x_28; lean_object* x_29; 
x_28 = lean_ctor_get(x_26, 0);
lean_inc(x_28);
lean_dec(x_26);
x_29 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_29, 0, x_28);
return x_29;
}
}
}
}
else
{
lean_dec(x_17);
x_10 = lean_box(0);
goto block_13;
}
}
block_13:
{
lean_object* x_11; 
x_11 = l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_WorkerContext_resolveServerRequestResponse_spec__0___redArg(x_4, x_9);
x_1 = x_11;
x_2 = x_7;
goto _start;
}
}
else
{
lean_dec(x_7);
lean_dec(x_5);
lean_dec(x_4);
return x_8;
}
}
else
{
lean_object* x_38; 
x_38 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_38, 0, x_1);
return x_38;
}
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_6; 
x_6 = l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg(x_1, x_2);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_mainLoop_spec__2___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; 
x_4 = lean_ctor_get(x_2, 1);
x_5 = lean_ctor_get(x_2, 2);
x_6 = lean_ctor_get(x_2, 3);
x_7 = lean_ctor_get(x_2, 4);
x_8 = l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_mainLoop_spec__2___redArg(x_1, x_6);
if (lean_obj_tag(x_8) == 0)
{
lean_object* x_9; 
x_9 = lean_ctor_get(x_8, 0);
lean_inc(x_9);
if (lean_obj_tag(x_9) == 0)
{
lean_dec_ref(x_9);
return x_8;
}
else
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; 
lean_dec_ref(x_8);
x_10 = lean_ctor_get(x_9, 0);
lean_inc(x_10);
lean_dec_ref(x_9);
x_11 = lean_st_ref_get(x_5);
x_12 = l_Lean_Server_FileWorker_RpcSession_hasExpired(x_11);
lean_dec(x_11);
if (lean_obj_tag(x_12) == 0)
{
lean_object* x_13; uint8_t x_14; 
x_13 = lean_ctor_get(x_12, 0);
lean_inc(x_13);
lean_dec_ref(x_12);
x_14 = lean_unbox(x_13);
lean_dec(x_13);
if (x_14 == 0)
{
x_1 = x_10;
x_2 = x_7;
goto _start;
}
else
{
uint8_t x_16; 
x_16 = !lean_is_exclusive(x_10);
if (x_16 == 0)
{
lean_object* x_17; uint64_t x_18; lean_object* x_19; 
x_17 = lean_ctor_get(x_10, 4);
x_18 = lean_unbox_uint64(x_4);
x_19 = l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_mainLoop_spec__0___redArg(x_18, x_17);
lean_ctor_set(x_10, 4, x_19);
x_1 = x_10;
x_2 = x_7;
goto _start;
}
else
{
lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint64_t x_26; lean_object* x_27; lean_object* x_28; 
x_21 = lean_ctor_get(x_10, 0);
x_22 = lean_ctor_get(x_10, 1);
x_23 = lean_ctor_get(x_10, 2);
x_24 = lean_ctor_get(x_10, 3);
x_25 = lean_ctor_get(x_10, 4);
lean_inc(x_25);
lean_inc(x_24);
lean_inc(x_23);
lean_inc(x_22);
lean_inc(x_21);
lean_dec(x_10);
x_26 = lean_unbox_uint64(x_4);
x_27 = l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_mainLoop_spec__0___redArg(x_26, x_25);
x_28 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_28, 0, x_21);
lean_ctor_set(x_28, 1, x_22);
lean_ctor_set(x_28, 2, x_23);
lean_ctor_set(x_28, 3, x_24);
lean_ctor_set(x_28, 4, x_27);
x_1 = x_28;
x_2 = x_7;
goto _start;
}
}
}
else
{
uint8_t x_30; 
lean_dec(x_10);
x_30 = !lean_is_exclusive(x_12);
if (x_30 == 0)
{
return x_12;
}
else
{
lean_object* x_31; lean_object* x_32; 
x_31 = lean_ctor_get(x_12, 0);
lean_inc(x_31);
lean_dec(x_12);
x_32 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_32, 0, x_31);
return x_32;
}
}
}
}
else
{
return x_8;
}
}
else
{
lean_object* x_33; lean_object* x_34; 
x_33 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_33, 0, x_1);
x_34 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_34, 0, x_33);
return x_34;
}
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_mainLoop_spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_6; 
x_6 = l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_mainLoop_spec__2___redArg(x_1, x_2);
return x_6;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_mainLoop___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Got invalid JSON-RPC message", 28, 28);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_mainLoop___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("exit", 4, 4);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_mainLoop(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_14; lean_object* x_18; lean_object* x_19; 
x_18 = lean_st_ref_get(x_3);
lean_inc_ref(x_1);
x_19 = l_IO_FS_Stream_readLspMessage(x_1);
if (lean_obj_tag(x_19) == 0)
{
lean_object* x_20; uint8_t x_21; 
x_20 = lean_ctor_get(x_19, 0);
lean_inc(x_20);
lean_dec_ref(x_19);
x_21 = !lean_is_exclusive(x_18);
if (x_21 == 0)
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; 
x_22 = lean_ctor_get(x_18, 0);
x_23 = lean_ctor_get(x_18, 1);
x_24 = lean_ctor_get(x_18, 2);
x_25 = lean_ctor_get(x_18, 3);
x_26 = lean_ctor_get(x_18, 4);
lean_inc(x_25);
x_27 = l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg(x_25, x_25);
if (lean_obj_tag(x_27) == 0)
{
lean_object* x_28; lean_object* x_29; 
x_28 = lean_ctor_get(x_27, 0);
lean_inc(x_28);
lean_dec_ref(x_27);
lean_inc(x_26);
lean_ctor_set(x_18, 3, x_28);
x_29 = l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_mainLoop_spec__2___redArg(x_18, x_26);
lean_dec(x_26);
if (lean_obj_tag(x_29) == 0)
{
lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_59; 
x_30 = lean_ctor_get(x_29, 0);
lean_inc(x_30);
if (lean_is_exclusive(x_29)) {
 lean_ctor_release(x_29, 0);
 x_31 = x_29;
} else {
 lean_dec_ref(x_29);
 x_31 = lean_box(0);
}
x_59 = lean_ctor_get(x_30, 0);
lean_inc(x_59);
lean_dec(x_30);
x_32 = x_59;
goto block_58;
block_58:
{
lean_object* x_33; 
x_33 = lean_st_ref_set(x_3, x_32);
switch (lean_obj_tag(x_20)) {
case 0:
{
lean_object* x_34; 
lean_dec(x_31);
x_34 = lean_ctor_get(x_20, 2);
lean_inc(x_34);
if (lean_obj_tag(x_34) == 1)
{
lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; 
x_35 = lean_ctor_get(x_20, 0);
lean_inc(x_35);
x_36 = lean_ctor_get(x_20, 1);
lean_inc_ref(x_36);
lean_dec_ref(x_20);
x_37 = lean_ctor_get(x_34, 0);
lean_inc(x_37);
lean_dec_ref(x_34);
x_38 = l_Lean_Json_Structured_toJson(x_37);
lean_inc_ref(x_2);
x_39 = l_Lean_Server_FileWorker_handleRequest(x_35, x_36, x_38, x_2, x_3);
lean_dec_ref(x_39);
goto _start;
}
else
{
lean_dec(x_34);
lean_dec_ref(x_20);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_14 = lean_box(0);
goto block_17;
}
}
case 1:
{
lean_object* x_41; lean_object* x_42; lean_object* x_43; uint8_t x_44; 
x_41 = lean_ctor_get(x_20, 0);
lean_inc_ref(x_41);
x_42 = lean_ctor_get(x_20, 1);
lean_inc(x_42);
lean_dec_ref(x_20);
x_43 = l_Lean_Server_FileWorker_mainLoop___closed__1;
x_44 = lean_string_dec_eq(x_41, x_43);
if (x_44 == 0)
{
lean_dec(x_31);
if (lean_obj_tag(x_42) == 1)
{
lean_object* x_45; 
x_45 = lean_ctor_get(x_42, 0);
lean_inc(x_45);
lean_dec_ref(x_42);
x_5 = x_41;
x_6 = x_45;
x_7 = x_2;
x_8 = x_3;
x_9 = lean_box(0);
goto block_13;
}
else
{
lean_dec(x_42);
lean_dec_ref(x_41);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_14 = lean_box(0);
goto block_17;
}
}
else
{
lean_dec_ref(x_41);
if (lean_obj_tag(x_42) == 0)
{
lean_object* x_46; lean_object* x_47; 
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_46 = lean_box(0);
if (lean_is_scalar(x_31)) {
 x_47 = lean_alloc_ctor(0, 1, 0);
} else {
 x_47 = x_31;
}
lean_ctor_set(x_47, 0, x_46);
return x_47;
}
else
{
lean_object* x_48; 
lean_dec(x_31);
x_48 = lean_ctor_get(x_42, 0);
lean_inc(x_48);
lean_dec_ref(x_42);
x_5 = x_43;
x_6 = x_48;
x_7 = x_2;
x_8 = x_3;
x_9 = lean_box(0);
goto block_13;
}
}
}
case 2:
{
lean_object* x_49; lean_object* x_50; lean_object* x_51; 
lean_dec(x_31);
x_49 = lean_ctor_get(x_20, 0);
lean_inc(x_49);
x_50 = lean_ctor_get(x_20, 1);
lean_inc(x_50);
lean_dec_ref(x_20);
x_51 = l_Lean_Server_FileWorker_handleResponse___redArg(x_49, x_50, x_2);
lean_dec_ref(x_51);
goto _start;
}
default: 
{
lean_object* x_53; uint8_t x_54; lean_object* x_55; lean_object* x_56; 
lean_dec(x_31);
x_53 = lean_ctor_get(x_20, 0);
lean_inc(x_53);
x_54 = lean_ctor_get_uint8(x_20, sizeof(void*)*3);
x_55 = lean_ctor_get(x_20, 1);
lean_inc_ref(x_55);
lean_dec_ref(x_20);
x_56 = l_Lean_Server_FileWorker_handleResponseError___redArg(x_53, x_54, x_55, x_2);
lean_dec_ref(x_56);
goto _start;
}
}
}
}
else
{
uint8_t x_60; 
lean_dec(x_20);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_60 = !lean_is_exclusive(x_29);
if (x_60 == 0)
{
return x_29;
}
else
{
lean_object* x_61; lean_object* x_62; 
x_61 = lean_ctor_get(x_29, 0);
lean_inc(x_61);
lean_dec(x_29);
x_62 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_62, 0, x_61);
return x_62;
}
}
}
else
{
uint8_t x_63; 
lean_free_object(x_18);
lean_dec(x_26);
lean_dec(x_24);
lean_dec(x_23);
lean_dec_ref(x_22);
lean_dec(x_20);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_63 = !lean_is_exclusive(x_27);
if (x_63 == 0)
{
return x_27;
}
else
{
lean_object* x_64; lean_object* x_65; 
x_64 = lean_ctor_get(x_27, 0);
lean_inc(x_64);
lean_dec(x_27);
x_65 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_65, 0, x_64);
return x_65;
}
}
}
else
{
lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; 
x_66 = lean_ctor_get(x_18, 0);
x_67 = lean_ctor_get(x_18, 1);
x_68 = lean_ctor_get(x_18, 2);
x_69 = lean_ctor_get(x_18, 3);
x_70 = lean_ctor_get(x_18, 4);
lean_inc(x_70);
lean_inc(x_69);
lean_inc(x_68);
lean_inc(x_67);
lean_inc(x_66);
lean_dec(x_18);
lean_inc(x_69);
x_71 = l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg(x_69, x_69);
if (lean_obj_tag(x_71) == 0)
{
lean_object* x_72; lean_object* x_73; lean_object* x_74; 
x_72 = lean_ctor_get(x_71, 0);
lean_inc(x_72);
lean_dec_ref(x_71);
lean_inc(x_70);
x_73 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_73, 0, x_66);
lean_ctor_set(x_73, 1, x_67);
lean_ctor_set(x_73, 2, x_68);
lean_ctor_set(x_73, 3, x_72);
lean_ctor_set(x_73, 4, x_70);
x_74 = l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_mainLoop_spec__2___redArg(x_73, x_70);
lean_dec(x_70);
if (lean_obj_tag(x_74) == 0)
{
lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_104; 
x_75 = lean_ctor_get(x_74, 0);
lean_inc(x_75);
if (lean_is_exclusive(x_74)) {
 lean_ctor_release(x_74, 0);
 x_76 = x_74;
} else {
 lean_dec_ref(x_74);
 x_76 = lean_box(0);
}
x_104 = lean_ctor_get(x_75, 0);
lean_inc(x_104);
lean_dec(x_75);
x_77 = x_104;
goto block_103;
block_103:
{
lean_object* x_78; 
x_78 = lean_st_ref_set(x_3, x_77);
switch (lean_obj_tag(x_20)) {
case 0:
{
lean_object* x_79; 
lean_dec(x_76);
x_79 = lean_ctor_get(x_20, 2);
lean_inc(x_79);
if (lean_obj_tag(x_79) == 1)
{
lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; 
x_80 = lean_ctor_get(x_20, 0);
lean_inc(x_80);
x_81 = lean_ctor_get(x_20, 1);
lean_inc_ref(x_81);
lean_dec_ref(x_20);
x_82 = lean_ctor_get(x_79, 0);
lean_inc(x_82);
lean_dec_ref(x_79);
x_83 = l_Lean_Json_Structured_toJson(x_82);
lean_inc_ref(x_2);
x_84 = l_Lean_Server_FileWorker_handleRequest(x_80, x_81, x_83, x_2, x_3);
lean_dec_ref(x_84);
goto _start;
}
else
{
lean_dec(x_79);
lean_dec_ref(x_20);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_14 = lean_box(0);
goto block_17;
}
}
case 1:
{
lean_object* x_86; lean_object* x_87; lean_object* x_88; uint8_t x_89; 
x_86 = lean_ctor_get(x_20, 0);
lean_inc_ref(x_86);
x_87 = lean_ctor_get(x_20, 1);
lean_inc(x_87);
lean_dec_ref(x_20);
x_88 = l_Lean_Server_FileWorker_mainLoop___closed__1;
x_89 = lean_string_dec_eq(x_86, x_88);
if (x_89 == 0)
{
lean_dec(x_76);
if (lean_obj_tag(x_87) == 1)
{
lean_object* x_90; 
x_90 = lean_ctor_get(x_87, 0);
lean_inc(x_90);
lean_dec_ref(x_87);
x_5 = x_86;
x_6 = x_90;
x_7 = x_2;
x_8 = x_3;
x_9 = lean_box(0);
goto block_13;
}
else
{
lean_dec(x_87);
lean_dec_ref(x_86);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_14 = lean_box(0);
goto block_17;
}
}
else
{
lean_dec_ref(x_86);
if (lean_obj_tag(x_87) == 0)
{
lean_object* x_91; lean_object* x_92; 
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_91 = lean_box(0);
if (lean_is_scalar(x_76)) {
 x_92 = lean_alloc_ctor(0, 1, 0);
} else {
 x_92 = x_76;
}
lean_ctor_set(x_92, 0, x_91);
return x_92;
}
else
{
lean_object* x_93; 
lean_dec(x_76);
x_93 = lean_ctor_get(x_87, 0);
lean_inc(x_93);
lean_dec_ref(x_87);
x_5 = x_88;
x_6 = x_93;
x_7 = x_2;
x_8 = x_3;
x_9 = lean_box(0);
goto block_13;
}
}
}
case 2:
{
lean_object* x_94; lean_object* x_95; lean_object* x_96; 
lean_dec(x_76);
x_94 = lean_ctor_get(x_20, 0);
lean_inc(x_94);
x_95 = lean_ctor_get(x_20, 1);
lean_inc(x_95);
lean_dec_ref(x_20);
x_96 = l_Lean_Server_FileWorker_handleResponse___redArg(x_94, x_95, x_2);
lean_dec_ref(x_96);
goto _start;
}
default: 
{
lean_object* x_98; uint8_t x_99; lean_object* x_100; lean_object* x_101; 
lean_dec(x_76);
x_98 = lean_ctor_get(x_20, 0);
lean_inc(x_98);
x_99 = lean_ctor_get_uint8(x_20, sizeof(void*)*3);
x_100 = lean_ctor_get(x_20, 1);
lean_inc_ref(x_100);
lean_dec_ref(x_20);
x_101 = l_Lean_Server_FileWorker_handleResponseError___redArg(x_98, x_99, x_100, x_2);
lean_dec_ref(x_101);
goto _start;
}
}
}
}
else
{
lean_object* x_105; lean_object* x_106; lean_object* x_107; 
lean_dec(x_20);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_105 = lean_ctor_get(x_74, 0);
lean_inc(x_105);
if (lean_is_exclusive(x_74)) {
 lean_ctor_release(x_74, 0);
 x_106 = x_74;
} else {
 lean_dec_ref(x_74);
 x_106 = lean_box(0);
}
if (lean_is_scalar(x_106)) {
 x_107 = lean_alloc_ctor(1, 1, 0);
} else {
 x_107 = x_106;
}
lean_ctor_set(x_107, 0, x_105);
return x_107;
}
}
else
{
lean_object* x_108; lean_object* x_109; lean_object* x_110; 
lean_dec(x_70);
lean_dec(x_68);
lean_dec(x_67);
lean_dec_ref(x_66);
lean_dec(x_20);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_108 = lean_ctor_get(x_71, 0);
lean_inc(x_108);
if (lean_is_exclusive(x_71)) {
 lean_ctor_release(x_71, 0);
 x_109 = x_71;
} else {
 lean_dec_ref(x_71);
 x_109 = lean_box(0);
}
if (lean_is_scalar(x_109)) {
 x_110 = lean_alloc_ctor(1, 1, 0);
} else {
 x_110 = x_109;
}
lean_ctor_set(x_110, 0, x_108);
return x_110;
}
}
}
else
{
uint8_t x_111; 
lean_dec(x_18);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_111 = !lean_is_exclusive(x_19);
if (x_111 == 0)
{
return x_19;
}
else
{
lean_object* x_112; lean_object* x_113; 
x_112 = lean_ctor_get(x_19, 0);
lean_inc(x_112);
lean_dec(x_19);
x_113 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_113, 0, x_112);
return x_113;
}
}
block_13:
{
lean_object* x_10; lean_object* x_11; 
x_10 = l_Lean_Json_Structured_toJson(x_6);
lean_inc(x_8);
lean_inc_ref(x_7);
x_11 = l_Lean_Server_FileWorker_handleNotification(x_5, x_10, x_7, x_8);
lean_dec_ref(x_5);
if (lean_obj_tag(x_11) == 0)
{
lean_dec_ref(x_11);
x_2 = x_7;
x_3 = x_8;
goto _start;
}
else
{
lean_dec(x_8);
lean_dec_ref(x_7);
lean_dec_ref(x_1);
return x_11;
}
}
block_17:
{
lean_object* x_15; lean_object* x_16; 
x_15 = l_Lean_Server_FileWorker_mainLoop___closed__0;
x_16 = l_IO_throwServerError___redArg(x_15);
return x_16;
}
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_mainLoop_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint64_t x_5; lean_object* x_6; 
x_5 = lean_unbox_uint64(x_2);
lean_dec(x_2);
x_6 = l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_mainLoop_spec__0(x_1, x_5, x_3, x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1(x_1, x_2, x_3, x_4);
lean_dec(x_4);
lean_dec_ref(x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_mainLoop_spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_mainLoop_spec__2(x_1, x_2, x_3, x_4);
lean_dec(x_4);
lean_dec_ref(x_3);
lean_dec(x_2);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_mainLoop_spec__2___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Std_DTreeMap_Internal_Impl_forInStep___at___00Lean_Server_FileWorker_mainLoop_spec__2___redArg(x_1, x_2);
lean_dec(x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg(x_1, x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_mainLoop___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_mainLoop(x_1, x_2, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_mainLoop_spec__0___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint64_t x_3; lean_object* x_4; 
x_3 = lean_unbox_uint64(x_1);
lean_dec(x_1);
x_4 = l_Std_DTreeMap_Internal_Impl_erase___at___00Lean_Server_FileWorker_mainLoop_spec__0___redArg(x_3, x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_runRefreshTasks_sleepWithCancellation_spec__0(lean_object* x_1, uint32_t x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; lean_object* x_6; uint32_t x_7; uint32_t x_20; uint32_t x_21; uint8_t x_22; 
x_5 = lean_ctor_get(x_3, 1);
lean_inc(x_5);
if (lean_is_exclusive(x_3)) {
 lean_ctor_release(x_3, 0);
 lean_ctor_release(x_3, 1);
 x_6 = x_3;
} else {
 lean_dec_ref(x_3);
 x_6 = lean_box(0);
}
x_20 = 0;
x_21 = lean_unbox_uint32(x_5);
x_22 = lean_uint32_dec_lt(x_20, x_21);
if (x_22 == 0)
{
lean_object* x_23; 
lean_dec(x_6);
x_23 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_23, 0, x_1);
lean_ctor_set(x_23, 1, x_5);
return x_23;
}
else
{
uint32_t x_24; uint8_t x_25; 
x_24 = lean_unbox_uint32(x_5);
x_25 = lean_uint32_dec_lt(x_24, x_2);
if (x_25 == 0)
{
x_7 = x_2;
goto block_19;
}
else
{
uint32_t x_26; 
x_26 = lean_unbox_uint32(x_5);
x_7 = x_26;
goto block_19;
}
}
block_19:
{
lean_object* x_8; uint8_t x_9; uint32_t x_10; uint32_t x_11; 
x_8 = l_IO_sleep(x_7);
x_9 = lean_io_check_canceled();
x_10 = lean_unbox_uint32(x_5);
lean_dec(x_5);
x_11 = lean_uint32_sub(x_10, x_7);
if (x_9 == 0)
{
lean_object* x_12; lean_object* x_13; 
x_12 = lean_box_uint32(x_11);
lean_inc(x_1);
if (lean_is_scalar(x_6)) {
 x_13 = lean_alloc_ctor(0, 2, 0);
} else {
 x_13 = x_6;
}
lean_ctor_set(x_13, 0, x_1);
lean_ctor_set(x_13, 1, x_12);
x_3 = x_13;
goto _start;
}
else
{
lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; 
lean_dec(x_1);
x_15 = lean_box(x_9);
x_16 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_16, 0, x_15);
x_17 = lean_box_uint32(x_11);
if (lean_is_scalar(x_6)) {
 x_18 = lean_alloc_ctor(0, 2, 0);
} else {
 x_18 = x_6;
}
lean_ctor_set(x_18, 0, x_16);
lean_ctor_set(x_18, 1, x_17);
return x_18;
}
}
}
}
LEAN_EXPORT uint8_t l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_runRefreshTasks_sleepWithCancellation(uint32_t x_1) {
_start:
{
uint8_t x_3; 
x_3 = lean_io_check_canceled();
if (x_3 == 0)
{
uint32_t x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 
x_4 = 200;
x_5 = lean_box(0);
x_6 = lean_box_uint32(x_1);
x_7 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_7, 0, x_5);
lean_ctor_set(x_7, 1, x_6);
x_8 = l___private_Init_While_0__Lean_Loop_forIn_loop___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_runRefreshTasks_sleepWithCancellation_spec__0(x_5, x_4, x_7);
x_9 = lean_ctor_get(x_8, 0);
lean_inc(x_9);
lean_dec_ref(x_8);
if (lean_obj_tag(x_9) == 0)
{
return x_3;
}
else
{
lean_object* x_10; uint8_t x_11; 
x_10 = lean_ctor_get(x_9, 0);
lean_inc(x_10);
lean_dec_ref(x_9);
x_11 = lean_unbox(x_10);
lean_dec(x_10);
return x_11;
}
}
else
{
return x_3;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_runRefreshTasks_sleepWithCancellation___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint32_t x_3; uint8_t x_4; lean_object* x_5; 
x_3 = lean_unbox_uint32(x_1);
lean_dec(x_1);
x_4 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_runRefreshTasks_sleepWithCancellation(x_3);
x_5 = lean_box(x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_runRefreshTasks_sleepWithCancellation_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint32_t x_5; lean_object* x_6; 
x_5 = lean_unbox_uint32(x_2);
lean_dec(x_2);
x_6 = l___private_Init_While_0__Lean_Loop_forIn_loop___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_runRefreshTasks_sleepWithCancellation_spec__0(x_1, x_5, x_3);
return x_6;
}
}
static lean_object* _init_l_Option_fromJson_x3f___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0_spec__0___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_box(0);
x_2 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Option_fromJson_x3f___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0_spec__0(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_2; 
x_2 = l_Option_fromJson_x3f___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0_spec__0___closed__0;
return x_2;
}
else
{
lean_object* x_3; 
x_3 = l_Lean_Json_getNat_x3f(x_1);
if (lean_obj_tag(x_3) == 0)
{
uint8_t x_4; 
x_4 = !lean_is_exclusive(x_3);
if (x_4 == 0)
{
return x_3;
}
else
{
lean_object* x_5; lean_object* x_6; 
x_5 = lean_ctor_get(x_3, 0);
lean_inc(x_5);
lean_dec(x_3);
x_6 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_6, 0, x_5);
return x_6;
}
}
else
{
uint8_t x_7; 
x_7 = !lean_is_exclusive(x_3);
if (x_7 == 0)
{
lean_object* x_8; lean_object* x_9; 
x_8 = lean_ctor_get(x_3, 0);
x_9 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_9, 0, x_8);
lean_ctor_set(x_3, 0, x_9);
return x_3;
}
else
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_10 = lean_ctor_get(x_3, 0);
lean_inc(x_10);
lean_dec(x_3);
x_11 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_11, 0, x_10);
x_12 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_12, 0, x_11);
return x_12;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0___redArg___lam__0(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
uint8_t x_2; 
x_2 = !lean_is_exclusive(x_1);
if (x_2 == 0)
{
lean_object* x_3; lean_object* x_4; 
x_3 = lean_ctor_get(x_1, 0);
x_4 = l_Option_fromJson_x3f___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0_spec__0(x_3);
if (lean_obj_tag(x_4) == 0)
{
lean_object* x_5; uint8_t x_6; lean_object* x_7; 
lean_free_object(x_1);
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
lean_dec_ref(x_4);
x_6 = 3;
x_7 = lean_alloc_ctor(1, 1, 1);
lean_ctor_set(x_7, 0, x_5);
lean_ctor_set_uint8(x_7, sizeof(void*)*1, x_6);
return x_7;
}
else
{
lean_object* x_8; 
x_8 = lean_ctor_get(x_4, 0);
lean_inc(x_8);
lean_dec_ref(x_4);
lean_ctor_set(x_1, 0, x_8);
return x_1;
}
}
else
{
lean_object* x_9; lean_object* x_10; 
x_9 = lean_ctor_get(x_1, 0);
lean_inc(x_9);
lean_dec(x_1);
x_10 = l_Option_fromJson_x3f___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0_spec__0(x_9);
if (lean_obj_tag(x_10) == 0)
{
lean_object* x_11; uint8_t x_12; lean_object* x_13; 
x_11 = lean_ctor_get(x_10, 0);
lean_inc(x_11);
lean_dec_ref(x_10);
x_12 = 3;
x_13 = lean_alloc_ctor(1, 1, 1);
lean_ctor_set(x_13, 0, x_11);
lean_ctor_set_uint8(x_13, sizeof(void*)*1, x_12);
return x_13;
}
else
{
lean_object* x_14; lean_object* x_15; 
x_14 = lean_ctor_get(x_10, 0);
lean_inc(x_14);
lean_dec_ref(x_10);
x_15 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_15, 0, x_14);
return x_15;
}
}
}
else
{
uint8_t x_16; 
x_16 = !lean_is_exclusive(x_1);
if (x_16 == 0)
{
return x_1;
}
else
{
uint8_t x_17; lean_object* x_18; lean_object* x_19; 
x_17 = lean_ctor_get_uint8(x_1, sizeof(void*)*1);
x_18 = lean_ctor_get(x_1, 0);
lean_inc(x_18);
lean_dec(x_1);
x_19 = lean_alloc_ctor(1, 1, 1);
lean_ctor_set(x_19, 0, x_18);
lean_ctor_set_uint8(x_19, sizeof(void*)*1, x_17);
return x_19;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; 
x_4 = lean_io_promise_new();
x_5 = lean_ctor_get(x_1, 5);
x_6 = lean_st_ref_take(x_5);
lean_inc(x_4);
x_7 = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_sendUntypedServerRequest_spec__0_spec__0_spec__0___redArg(x_2, x_4, x_6);
x_8 = lean_st_ref_set(x_5, x_7);
x_9 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0___redArg___lam__0), 1, 0);
x_10 = l_IO_Promise_result_x21___redArg(x_4);
lean_dec(x_4);
x_11 = l_Lean_Server_ServerTask_mapCheap___redArg(x_9, x_10);
return x_11;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0___redArg(x_2, x_3);
return x_5;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = lean_box(0);
x_2 = lean_box(0);
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg___lam__0(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = lean_ctor_get(x_2, 2);
lean_inc(x_3);
if (lean_obj_tag(x_3) == 1)
{
uint8_t x_4; 
x_4 = !lean_is_exclusive(x_3);
if (x_4 == 0)
{
lean_object* x_5; uint8_t x_6; 
x_5 = lean_ctor_get(x_3, 0);
x_6 = !lean_is_exclusive(x_5);
if (x_6 == 0)
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; 
x_7 = lean_ctor_get(x_2, 0);
x_8 = lean_ctor_get(x_2, 1);
x_9 = lean_ctor_get(x_5, 0);
x_10 = lean_ctor_get(x_5, 1);
x_11 = lean_nat_dec_le(x_1, x_10);
lean_dec(x_10);
if (x_11 == 0)
{
lean_ctor_set(x_3, 0, x_9);
lean_ctor_set(x_5, 1, x_2);
lean_ctor_set(x_5, 0, x_3);
return x_5;
}
else
{
uint8_t x_12; 
lean_dec(x_9);
lean_inc(x_8);
lean_inc_ref(x_7);
lean_free_object(x_3);
x_12 = !lean_is_exclusive(x_2);
if (x_12 == 0)
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; 
x_13 = lean_ctor_get(x_2, 2);
lean_dec(x_13);
x_14 = lean_ctor_get(x_2, 1);
lean_dec(x_14);
x_15 = lean_ctor_get(x_2, 0);
lean_dec(x_15);
x_16 = lean_box(0);
lean_ctor_set(x_2, 2, x_16);
lean_ctor_set(x_5, 1, x_2);
lean_ctor_set(x_5, 0, x_16);
return x_5;
}
else
{
lean_object* x_17; lean_object* x_18; 
lean_dec(x_2);
x_17 = lean_box(0);
x_18 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_18, 0, x_7);
lean_ctor_set(x_18, 1, x_8);
lean_ctor_set(x_18, 2, x_17);
lean_ctor_set(x_5, 1, x_18);
lean_ctor_set(x_5, 0, x_17);
return x_5;
}
}
}
else
{
lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; 
x_19 = lean_ctor_get(x_2, 0);
x_20 = lean_ctor_get(x_2, 1);
x_21 = lean_ctor_get(x_5, 0);
x_22 = lean_ctor_get(x_5, 1);
lean_inc(x_22);
lean_inc(x_21);
lean_dec(x_5);
x_23 = lean_nat_dec_le(x_1, x_22);
lean_dec(x_22);
if (x_23 == 0)
{
lean_object* x_24; 
lean_ctor_set(x_3, 0, x_21);
x_24 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_24, 0, x_3);
lean_ctor_set(x_24, 1, x_2);
return x_24;
}
else
{
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; 
lean_dec(x_21);
lean_inc(x_20);
lean_inc_ref(x_19);
lean_free_object(x_3);
if (lean_is_exclusive(x_2)) {
 lean_ctor_release(x_2, 0);
 lean_ctor_release(x_2, 1);
 lean_ctor_release(x_2, 2);
 x_25 = x_2;
} else {
 lean_dec_ref(x_2);
 x_25 = lean_box(0);
}
x_26 = lean_box(0);
if (lean_is_scalar(x_25)) {
 x_27 = lean_alloc_ctor(0, 3, 0);
} else {
 x_27 = x_25;
}
lean_ctor_set(x_27, 0, x_19);
lean_ctor_set(x_27, 1, x_20);
lean_ctor_set(x_27, 2, x_26);
x_28 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_28, 0, x_26);
lean_ctor_set(x_28, 1, x_27);
return x_28;
}
}
}
else
{
lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; 
x_29 = lean_ctor_get(x_3, 0);
lean_inc(x_29);
lean_dec(x_3);
x_30 = lean_ctor_get(x_2, 0);
x_31 = lean_ctor_get(x_2, 1);
x_32 = lean_ctor_get(x_29, 0);
lean_inc(x_32);
x_33 = lean_ctor_get(x_29, 1);
lean_inc(x_33);
if (lean_is_exclusive(x_29)) {
 lean_ctor_release(x_29, 0);
 lean_ctor_release(x_29, 1);
 x_34 = x_29;
} else {
 lean_dec_ref(x_29);
 x_34 = lean_box(0);
}
x_35 = lean_nat_dec_le(x_1, x_33);
lean_dec(x_33);
if (x_35 == 0)
{
lean_object* x_36; lean_object* x_37; 
x_36 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_36, 0, x_32);
if (lean_is_scalar(x_34)) {
 x_37 = lean_alloc_ctor(0, 2, 0);
} else {
 x_37 = x_34;
}
lean_ctor_set(x_37, 0, x_36);
lean_ctor_set(x_37, 1, x_2);
return x_37;
}
else
{
lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; 
lean_dec(x_32);
lean_inc(x_31);
lean_inc_ref(x_30);
if (lean_is_exclusive(x_2)) {
 lean_ctor_release(x_2, 0);
 lean_ctor_release(x_2, 1);
 lean_ctor_release(x_2, 2);
 x_38 = x_2;
} else {
 lean_dec_ref(x_2);
 x_38 = lean_box(0);
}
x_39 = lean_box(0);
if (lean_is_scalar(x_38)) {
 x_40 = lean_alloc_ctor(0, 3, 0);
} else {
 x_40 = x_38;
}
lean_ctor_set(x_40, 0, x_30);
lean_ctor_set(x_40, 1, x_31);
lean_ctor_set(x_40, 2, x_39);
if (lean_is_scalar(x_34)) {
 x_41 = lean_alloc_ctor(0, 2, 0);
} else {
 x_41 = x_34;
}
lean_ctor_set(x_41, 0, x_39);
lean_ctor_set(x_41, 1, x_40);
return x_41;
}
}
}
else
{
lean_object* x_42; lean_object* x_43; 
lean_dec(x_3);
x_42 = lean_box(0);
x_43 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_43, 0, x_42);
lean_ctor_set(x_43, 1, x_2);
return x_43;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg___lam__0___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg___lam__0(x_1, x_2);
lean_dec(x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg___lam__1(lean_object* x_1, uint8_t x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = lean_ctor_get(x_3, 2);
lean_inc(x_4);
if (lean_obj_tag(x_4) == 1)
{
uint8_t x_5; 
x_5 = !lean_is_exclusive(x_4);
if (x_5 == 0)
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; 
x_6 = lean_ctor_get(x_3, 0);
x_7 = lean_ctor_get(x_3, 1);
x_8 = lean_ctor_get(x_4, 0);
x_9 = lean_unsigned_to_nat(0u);
x_10 = lean_nat_dec_lt(x_9, x_7);
if (x_10 == 0)
{
uint8_t x_11; 
lean_inc(x_7);
lean_inc_ref(x_6);
x_11 = !lean_is_exclusive(x_3);
if (x_11 == 0)
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; 
x_12 = lean_ctor_get(x_3, 2);
lean_dec(x_12);
x_13 = lean_ctor_get(x_3, 1);
lean_dec(x_13);
x_14 = lean_ctor_get(x_3, 0);
lean_dec(x_14);
x_15 = !lean_is_exclusive(x_8);
if (x_15 == 0)
{
lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; 
x_16 = lean_ctor_get(x_8, 1);
x_17 = lean_ctor_get(x_8, 0);
lean_dec(x_17);
x_18 = lean_unsigned_to_nat(1u);
x_19 = lean_nat_add(x_16, x_18);
lean_dec(x_16);
lean_ctor_set(x_8, 1, x_19);
lean_ctor_set(x_8, 0, x_1);
x_20 = lean_box(x_2);
x_21 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_21, 0, x_20);
lean_ctor_set(x_21, 1, x_3);
return x_21;
}
else
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; 
x_22 = lean_ctor_get(x_8, 1);
lean_inc(x_22);
lean_dec(x_8);
x_23 = lean_unsigned_to_nat(1u);
x_24 = lean_nat_add(x_22, x_23);
lean_dec(x_22);
x_25 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_25, 0, x_1);
lean_ctor_set(x_25, 1, x_24);
lean_ctor_set(x_4, 0, x_25);
x_26 = lean_box(x_2);
x_27 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_27, 0, x_26);
lean_ctor_set(x_27, 1, x_3);
return x_27;
}
}
else
{
lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; 
lean_dec(x_3);
x_28 = lean_ctor_get(x_8, 1);
lean_inc(x_28);
if (lean_is_exclusive(x_8)) {
 lean_ctor_release(x_8, 0);
 lean_ctor_release(x_8, 1);
 x_29 = x_8;
} else {
 lean_dec_ref(x_8);
 x_29 = lean_box(0);
}
x_30 = lean_unsigned_to_nat(1u);
x_31 = lean_nat_add(x_28, x_30);
lean_dec(x_28);
if (lean_is_scalar(x_29)) {
 x_32 = lean_alloc_ctor(0, 2, 0);
} else {
 x_32 = x_29;
}
lean_ctor_set(x_32, 0, x_1);
lean_ctor_set(x_32, 1, x_31);
lean_ctor_set(x_4, 0, x_32);
x_33 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_33, 0, x_6);
lean_ctor_set(x_33, 1, x_7);
lean_ctor_set(x_33, 2, x_4);
x_34 = lean_box(x_2);
x_35 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_35, 0, x_34);
lean_ctor_set(x_35, 1, x_33);
return x_35;
}
}
else
{
uint8_t x_36; lean_object* x_37; lean_object* x_38; 
lean_free_object(x_4);
lean_dec(x_8);
lean_dec(x_1);
x_36 = 0;
x_37 = lean_box(x_36);
x_38 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_38, 0, x_37);
lean_ctor_set(x_38, 1, x_3);
return x_38;
}
}
else
{
lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; uint8_t x_43; 
x_39 = lean_ctor_get(x_3, 0);
x_40 = lean_ctor_get(x_3, 1);
x_41 = lean_ctor_get(x_4, 0);
lean_inc(x_41);
lean_dec(x_4);
x_42 = lean_unsigned_to_nat(0u);
x_43 = lean_nat_dec_lt(x_42, x_40);
if (x_43 == 0)
{
lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; 
lean_inc(x_40);
lean_inc_ref(x_39);
if (lean_is_exclusive(x_3)) {
 lean_ctor_release(x_3, 0);
 lean_ctor_release(x_3, 1);
 lean_ctor_release(x_3, 2);
 x_44 = x_3;
} else {
 lean_dec_ref(x_3);
 x_44 = lean_box(0);
}
x_45 = lean_ctor_get(x_41, 1);
lean_inc(x_45);
if (lean_is_exclusive(x_41)) {
 lean_ctor_release(x_41, 0);
 lean_ctor_release(x_41, 1);
 x_46 = x_41;
} else {
 lean_dec_ref(x_41);
 x_46 = lean_box(0);
}
x_47 = lean_unsigned_to_nat(1u);
x_48 = lean_nat_add(x_45, x_47);
lean_dec(x_45);
if (lean_is_scalar(x_46)) {
 x_49 = lean_alloc_ctor(0, 2, 0);
} else {
 x_49 = x_46;
}
lean_ctor_set(x_49, 0, x_1);
lean_ctor_set(x_49, 1, x_48);
x_50 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_50, 0, x_49);
if (lean_is_scalar(x_44)) {
 x_51 = lean_alloc_ctor(0, 3, 0);
} else {
 x_51 = x_44;
}
lean_ctor_set(x_51, 0, x_39);
lean_ctor_set(x_51, 1, x_40);
lean_ctor_set(x_51, 2, x_50);
x_52 = lean_box(x_2);
x_53 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_53, 0, x_52);
lean_ctor_set(x_53, 1, x_51);
return x_53;
}
else
{
uint8_t x_54; lean_object* x_55; lean_object* x_56; 
lean_dec(x_41);
lean_dec(x_1);
x_54 = 0;
x_55 = lean_box(x_54);
x_56 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_56, 0, x_55);
lean_ctor_set(x_56, 1, x_3);
return x_56;
}
}
}
else
{
uint8_t x_57; lean_object* x_58; lean_object* x_59; 
lean_dec(x_4);
lean_dec(x_1);
x_57 = 0;
x_58 = lean_box(x_57);
x_59 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_59, 0, x_58);
lean_ctor_set(x_59, 1, x_3);
return x_59;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg___lam__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; lean_object* x_5; 
x_4 = lean_unbox(x_2);
x_5 = l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg___lam__1(x_1, x_4, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Option_toJson___at___00Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__2_spec__2(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_2; 
x_2 = lean_box(0);
return x_2;
}
else
{
uint8_t x_3; 
x_3 = !lean_is_exclusive(x_1);
if (x_3 == 0)
{
lean_object* x_4; lean_object* x_5; 
x_4 = lean_ctor_get(x_1, 0);
x_5 = l_Lean_JsonNumber_fromNat(x_4);
lean_ctor_set_tag(x_1, 2);
lean_ctor_set(x_1, 0, x_5);
return x_1;
}
else
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; 
x_6 = lean_ctor_get(x_1, 0);
lean_inc(x_6);
lean_dec(x_1);
x_7 = l_Lean_JsonNumber_fromNat(x_6);
x_8 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_8, 0, x_7);
return x_8;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__2(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; 
x_2 = l_Option_toJson___at___00Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__2_spec__2(x_1);
x_3 = l_Lean_Json_Structured_fromJson_x3f(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_20; 
x_6 = lean_ctor_get(x_2, 0);
lean_inc_ref(x_6);
x_7 = lean_ctor_get(x_2, 2);
x_8 = lean_st_ref_take(x_7);
x_9 = l_Lean_Server_FileWorker_sendServerRequest___redArg___closed__0;
x_10 = lean_int_add(x_8, x_9);
x_11 = lean_st_ref_set(x_7, x_10);
x_12 = l_Lean_JsonNumber_fromInt(x_8);
x_13 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_13, 0, x_12);
lean_inc_ref(x_13);
x_14 = l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0___redArg(x_2, x_13);
lean_dec_ref(x_2);
x_20 = l_Lean_Json_toStructured_x3f___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__2(x_4);
if (lean_obj_tag(x_20) == 0)
{
lean_object* x_21; 
lean_dec_ref(x_20);
x_21 = lean_box(0);
x_15 = x_21;
goto block_19;
}
else
{
uint8_t x_22; 
x_22 = !lean_is_exclusive(x_20);
if (x_22 == 0)
{
x_15 = x_20;
goto block_19;
}
else
{
lean_object* x_23; lean_object* x_24; 
x_23 = lean_ctor_get(x_20, 0);
lean_inc(x_23);
lean_dec(x_20);
x_24 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_24, 0, x_23);
x_15 = x_24;
goto block_19;
}
}
block_19:
{
lean_object* x_16; lean_object* x_17; lean_object* x_18; 
x_16 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_16, 0, x_13);
lean_ctor_set(x_16, 1, x_3);
lean_ctor_set(x_16, 2, x_15);
x_17 = l_Lean_Server_FileWorker_OutputMessage_ofMsg(x_16);
x_18 = l_Std_Channel_Sync_send___redArg(x_6, x_17);
return x_14;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_9; lean_object* x_10; 
lean_inc(x_3);
x_9 = lean_alloc_closure((void*)(l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg___lam__0___boxed), 2, 1);
lean_closure_set(x_9, 0, x_3);
lean_inc_ref(x_2);
x_10 = l_Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler___redArg(x_1, x_2, x_9);
if (lean_obj_tag(x_10) == 1)
{
lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_30; lean_object* x_31; lean_object* x_32; uint8_t x_33; 
x_11 = lean_ctor_get(x_10, 0);
lean_inc(x_11);
if (lean_is_exclusive(x_10)) {
 lean_ctor_release(x_10, 0);
 x_12 = x_10;
} else {
 lean_dec_ref(x_10);
 x_12 = lean_box(0);
}
x_13 = lean_io_mono_ms_now();
x_14 = 1;
x_30 = lean_nat_sub(x_13, x_11);
lean_dec(x_11);
lean_dec(x_13);
x_31 = lean_nat_sub(x_4, x_30);
lean_dec(x_30);
x_32 = lean_unsigned_to_nat(0u);
x_33 = lean_nat_dec_lt(x_32, x_31);
if (x_33 == 0)
{
lean_dec(x_31);
x_15 = lean_box(0);
goto block_29;
}
else
{
uint32_t x_34; uint8_t x_35; 
x_34 = lean_uint32_of_nat(x_31);
lean_dec(x_31);
x_35 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_runRefreshTasks_sleepWithCancellation(x_34);
if (x_35 == 0)
{
x_15 = lean_box(0);
goto block_29;
}
else
{
lean_object* x_36; lean_object* x_37; 
lean_dec(x_12);
lean_dec_ref(x_7);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_36 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_36, 0, x_6);
x_37 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_37, 0, x_36);
lean_ctor_set(x_37, 1, x_6);
return x_37;
}
}
block_29:
{
lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; 
x_16 = lean_io_mono_ms_now();
x_17 = lean_box(x_14);
x_18 = lean_alloc_closure((void*)(l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg___lam__1___boxed), 3, 2);
lean_closure_set(x_18, 0, x_16);
lean_closure_set(x_18, 1, x_17);
lean_inc_ref(x_2);
x_19 = l_Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler___redArg(x_1, x_2, x_18);
x_20 = lean_unbox(x_19);
lean_dec(x_19);
if (x_20 == 0)
{
uint32_t x_21; uint8_t x_22; 
x_21 = lean_uint32_of_nat(x_4);
x_22 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_runRefreshTasks_sleepWithCancellation(x_21);
if (x_22 == 0)
{
lean_dec(x_12);
goto _start;
}
else
{
lean_object* x_24; lean_object* x_25; 
lean_dec_ref(x_7);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
if (lean_is_scalar(x_12)) {
 x_24 = lean_alloc_ctor(1, 1, 0);
} else {
 x_24 = x_12;
}
lean_ctor_set(x_24, 0, x_6);
x_25 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_25, 0, x_24);
lean_ctor_set(x_25, 1, x_6);
return x_25;
}
}
else
{
lean_object* x_26; lean_object* x_27; 
lean_dec(x_12);
x_26 = lean_box(0);
lean_inc_ref(x_7);
lean_inc_ref(x_1);
x_27 = l_Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0(x_26, x_1, x_7, x_26);
lean_dec_ref(x_27);
goto _start;
}
}
}
else
{
uint32_t x_38; uint8_t x_39; 
lean_dec(x_10);
x_38 = lean_uint32_of_nat(x_4);
x_39 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_runRefreshTasks_sleepWithCancellation(x_38);
if (x_39 == 0)
{
goto _start;
}
else
{
lean_object* x_41; lean_object* x_42; 
lean_dec_ref(x_7);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_41 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_41, 0, x_6);
x_42 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_42, 0, x_41);
lean_ctor_set(x_42, 1, x_6);
return x_42;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; 
x_9 = l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
x_10 = lean_ctor_get(x_9, 0);
lean_inc(x_10);
lean_dec_ref(x_9);
x_11 = lean_ctor_get(x_10, 0);
lean_inc(x_11);
lean_dec(x_10);
return x_11;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg___lam__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
lean_object* x_9; 
x_9 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg___lam__0(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
lean_dec_ref(x_5);
lean_dec(x_4);
return x_9;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_t x_5, lean_object* x_6) {
_start:
{
uint8_t x_8; 
x_8 = lean_usize_dec_lt(x_5, x_4);
if (x_8 == 0)
{
lean_object* x_9; 
lean_dec(x_2);
lean_dec_ref(x_1);
x_9 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_9, 0, x_6);
return x_9;
}
else
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; size_t x_20; size_t x_21; 
x_10 = lean_array_uget(x_3, x_5);
x_11 = lean_ctor_get(x_10, 1);
lean_inc(x_11);
x_12 = lean_ctor_get(x_10, 0);
lean_inc(x_12);
lean_dec(x_10);
x_13 = lean_ctor_get(x_11, 0);
lean_inc(x_13);
x_14 = lean_ctor_get(x_11, 1);
lean_inc(x_14);
lean_dec(x_11);
x_15 = lean_box(0);
x_16 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg___closed__0;
lean_inc(x_2);
lean_inc_ref(x_1);
x_17 = lean_alloc_closure((void*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg___lam__0___boxed), 8, 7);
lean_closure_set(x_17, 0, x_1);
lean_closure_set(x_17, 1, x_12);
lean_closure_set(x_17, 2, x_2);
lean_closure_set(x_17, 3, x_14);
lean_closure_set(x_17, 4, x_16);
lean_closure_set(x_17, 5, x_15);
lean_closure_set(x_17, 6, x_13);
x_18 = l_Lean_Server_ServerTask_BaseIO_asTask___redArg(x_17);
x_19 = lean_array_push(x_6, x_18);
x_20 = 1;
x_21 = lean_usize_add(x_5, x_20);
x_5 = x_21;
x_6 = x_19;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_t x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
lean_object* x_10; 
x_10 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg(x_1, x_2, x_3, x_4, x_5, x_6);
return x_10;
}
}
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
lean_object* x_10; 
x_10 = l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
return x_10;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_runRefreshTasks___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_runRefreshTasks(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_partialLspRequestHandlerMethods();
if (lean_obj_tag(x_4) == 0)
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; 
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
lean_dec_ref(x_4);
x_6 = lean_unsigned_to_nat(10u);
x_7 = l_Lean_Server_FileWorker_runRefreshTasks___closed__0;
x_8 = lean_array_size(x_5);
x_9 = 0;
x_10 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg(x_1, x_6, x_5, x_8, x_9, x_7);
lean_dec(x_5);
return x_10;
}
else
{
uint8_t x_11; 
lean_dec_ref(x_1);
x_11 = !lean_is_exclusive(x_4);
if (x_11 == 0)
{
return x_4;
}
else
{
lean_object* x_12; lean_object* x_13; 
x_12 = lean_ctor_get(x_4, 0);
lean_inc(x_12);
lean_dec(x_4);
x_13 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_13, 0, x_12);
return x_13;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0(x_1, x_2, x_3);
lean_dec_ref(x_2);
lean_dec(x_1);
return x_5;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
_start:
{
size_t x_10; size_t x_11; lean_object* x_12; 
x_10 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_11 = lean_unbox_usize(x_5);
lean_dec(x_5);
x_12 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6(x_1, x_2, x_3, x_10, x_11, x_6, x_7, x_8);
lean_dec(x_8);
lean_dec_ref(x_7);
lean_dec_ref(x_3);
return x_12;
}
}
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
_start:
{
lean_object* x_10; 
x_10 = l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
lean_dec_ref(x_8);
lean_dec_ref(x_5);
lean_dec(x_4);
return x_10;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_runRefreshTasks___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_FileWorker_runRefreshTasks(x_1, x_2);
lean_dec(x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0___redArg(x_1, x_2);
lean_dec_ref(x_1);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0(x_1, x_2, x_3, x_4);
lean_dec(x_1);
return x_6;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
size_t x_8; size_t x_9; lean_object* x_10; 
x_8 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_9 = lean_unbox_usize(x_5);
lean_dec(x_5);
x_10 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg(x_1, x_2, x_3, x_8, x_9, x_6);
lean_dec_ref(x_3);
return x_10;
}
}
LEAN_EXPORT lean_object* l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
lean_object* x_9; 
x_9 = l___private_Init_While_0__Lean_Loop_forIn_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__5___redArg(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
lean_dec_ref(x_5);
lean_dec(x_4);
return x_9;
}
}
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initAndRunWorker_writeErrorDiag___closed__0() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3; 
x_1 = 0;
x_2 = lean_box(x_1);
x_3 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_3, 0, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initAndRunWorker_writeErrorDiag(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_27; 
x_5 = lean_ctor_get(x_2, 3);
x_6 = lean_ctor_get(x_5, 0);
x_7 = l_Lean_Server_FileWorker_setupImports___lam__0___closed__0;
x_8 = l_Lean_Server_FileWorker_setupImports___lam__0___closed__2;
x_9 = lean_string_utf8_byte_size(x_6);
lean_inc_ref(x_5);
x_10 = l_Lean_FileMap_utf8PosToLspPos(x_5, x_9);
lean_dec(x_9);
x_11 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_11, 0, x_7);
lean_ctor_set(x_11, 1, x_10);
x_12 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_12, 0, x_11);
x_13 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initAndRunWorker_writeErrorDiag___closed__0;
x_14 = lean_box(0);
x_15 = lean_io_error_to_string(x_3);
x_16 = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(x_16, 0, x_8);
lean_ctor_set(x_16, 1, x_12);
lean_ctor_set(x_16, 2, x_13);
lean_ctor_set(x_16, 3, x_14);
lean_ctor_set(x_16, 4, x_14);
lean_ctor_set(x_16, 5, x_14);
lean_ctor_set(x_16, 6, x_15);
lean_ctor_set(x_16, 7, x_14);
lean_ctor_set(x_16, 8, x_14);
lean_ctor_set(x_16, 9, x_14);
lean_ctor_set(x_16, 10, x_14);
x_17 = l_Lean_Server_FileWorker_setupImports___lam__0___closed__4;
x_18 = lean_array_push(x_17, x_16);
x_19 = l_Lean_Server_mkPublishDiagnosticsNotification(x_2, x_18);
x_20 = lean_ctor_get(x_19, 0);
lean_inc_ref(x_20);
x_21 = lean_ctor_get(x_19, 1);
lean_inc(x_21);
if (lean_is_exclusive(x_19)) {
 lean_ctor_release(x_19, 0);
 lean_ctor_release(x_19, 1);
 x_22 = x_19;
} else {
 lean_dec_ref(x_19);
 x_22 = lean_box(0);
}
x_27 = l_Lean_Json_toStructured_x3f___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_publishDiagnostics_spec__1(x_21);
if (lean_obj_tag(x_27) == 0)
{
lean_dec_ref(x_27);
x_23 = x_14;
goto block_26;
}
else
{
uint8_t x_28; 
x_28 = !lean_is_exclusive(x_27);
if (x_28 == 0)
{
x_23 = x_27;
goto block_26;
}
else
{
lean_object* x_29; lean_object* x_30; 
x_29 = lean_ctor_get(x_27, 0);
lean_inc(x_29);
lean_dec(x_27);
x_30 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_30, 0, x_29);
x_23 = x_30;
goto block_26;
}
}
block_26:
{
lean_object* x_24; lean_object* x_25; 
if (lean_is_scalar(x_22)) {
 x_24 = lean_alloc_ctor(1, 2, 0);
} else {
 x_24 = x_22;
 lean_ctor_set_tag(x_24, 1);
}
lean_ctor_set(x_24, 0, x_20);
lean_ctor_set(x_24, 1, x_23);
x_25 = l_IO_FS_Stream_writeLspMessage(x_1, x_24);
return x_25;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initAndRunWorker_writeErrorDiag___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initAndRunWorker_writeErrorDiag(x_1, x_2, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initAndRunWorker_spec__14___redArg(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5) {
_start:
{
uint8_t x_7; 
x_7 = lean_usize_dec_lt(x_4, x_3);
if (x_7 == 0)
{
lean_object* x_8; 
x_8 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_8, 0, x_5);
return x_8;
}
else
{
lean_object* x_9; lean_object* x_10; size_t x_11; size_t x_12; 
x_9 = lean_array_uget(x_2, x_4);
x_10 = lean_io_cancel(x_9);
lean_dec(x_9);
x_11 = 1;
x_12 = lean_usize_add(x_4, x_11);
{
size_t _tmp_3 = x_12;
lean_object* _tmp_4 = x_1;
x_4 = _tmp_3;
x_5 = _tmp_4;
}
goto _start;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initAndRunWorker_spec__14(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_9; 
x_9 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initAndRunWorker_spec__14___redArg(x_1, x_2, x_3, x_4, x_5);
return x_9;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__1(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; 
x_3 = l_Lean_Json_getObjValD(x_1, x_2);
x_4 = l_Lean_Lsp_instFromJsonClientCapabilities_fromJson(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__2(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; 
x_3 = l_Lean_Json_getObjValD(x_1, x_2);
x_4 = l_Lean_Json_getInt_x3f(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__3(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; 
x_3 = l_Lean_Json_getObjValD(x_1, x_2);
x_4 = l_Lean_Lsp_instFromJsonClientInfo_fromJson(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__4(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; 
x_3 = l_Lean_Json_getObjValD(x_1, x_2);
x_4 = l_Lean_Json_getStr_x3f(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__5(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; 
x_3 = l_Lean_Json_getObjValD(x_1, x_2);
x_4 = l_Lean_Lsp_instFromJsonInitializationOptions_fromJson(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_fromJson_x3f___at___00Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__6_spec__6_spec__6(size_t x_1, size_t x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; 
x_4 = lean_usize_dec_lt(x_2, x_1);
if (x_4 == 0)
{
lean_object* x_5; 
x_5 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_5, 0, x_3);
return x_5;
}
else
{
lean_object* x_6; lean_object* x_7; 
x_6 = lean_array_uget(x_3, x_2);
x_7 = l_Lean_Lsp_instFromJsonWorkspaceFolder_fromJson(x_6);
if (lean_obj_tag(x_7) == 0)
{
uint8_t x_8; 
lean_dec_ref(x_3);
x_8 = !lean_is_exclusive(x_7);
if (x_8 == 0)
{
return x_7;
}
else
{
lean_object* x_9; lean_object* x_10; 
x_9 = lean_ctor_get(x_7, 0);
lean_inc(x_9);
lean_dec(x_7);
x_10 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_10, 0, x_9);
return x_10;
}
}
else
{
lean_object* x_11; lean_object* x_12; lean_object* x_13; size_t x_14; size_t x_15; lean_object* x_16; 
x_11 = lean_ctor_get(x_7, 0);
lean_inc(x_11);
lean_dec_ref(x_7);
x_12 = lean_unsigned_to_nat(0u);
x_13 = lean_array_uset(x_3, x_2, x_12);
x_14 = 1;
x_15 = lean_usize_add(x_2, x_14);
x_16 = lean_array_uset(x_13, x_2, x_11);
x_2 = x_15;
x_3 = x_16;
goto _start;
}
}
}
}
LEAN_EXPORT lean_object* l_Array_fromJson_x3f___at___00Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__6_spec__6(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 4)
{
lean_object* x_2; size_t x_3; size_t x_4; lean_object* x_5; 
x_2 = lean_ctor_get(x_1, 0);
lean_inc_ref(x_2);
lean_dec_ref(x_1);
x_3 = lean_array_size(x_2);
x_4 = 0;
x_5 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_fromJson_x3f___at___00Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__6_spec__6_spec__6(x_3, x_4, x_2);
return x_5;
}
else
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_6 = l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__0;
x_7 = lean_unsigned_to_nat(80u);
x_8 = l_Lean_Json_pretty(x_1, x_7);
x_9 = lean_string_append(x_6, x_8);
lean_dec_ref(x_8);
x_10 = l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__1;
x_11 = lean_string_append(x_9, x_10);
x_12 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_12, 0, x_11);
return x_12;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__6(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; 
x_3 = l_Lean_Json_getObjValD(x_1, x_2);
x_4 = l_Array_fromJson_x3f___at___00Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__6_spec__6(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Option_toJson___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__0(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_2; 
x_2 = lean_box(0);
return x_2;
}
else
{
lean_object* x_3; lean_object* x_4; 
x_3 = lean_ctor_get(x_1, 0);
lean_inc(x_3);
lean_dec_ref(x_1);
x_4 = l_Lean_Json_Structured_toJson(x_3);
return x_4;
}
}
}
static lean_object* _init_l_IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Cannot read LSP notification: ", 30, 30);
return x_1;
}
}
static lean_object* _init_l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Expected method '", 17, 17);
return x_1;
}
}
static lean_object* _init_l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("', got method '", 15, 15);
return x_1;
}
}
static lean_object* _init_l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Unexpected param '", 18, 18);
return x_1;
}
}
static lean_object* _init_l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__3() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("' for method '", 14, 14);
return x_1;
}
}
static lean_object* _init_l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__4() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("'\n", 2, 2);
return x_1;
}
}
static lean_object* _init_l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__5() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Expected JSON-RPC notification, got: '", 38, 38);
return x_1;
}
}
LEAN_EXPORT lean_object* l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; 
x_5 = l_IO_FS_Stream_readMessage(x_1, x_2);
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_6; lean_object* x_7; 
x_6 = lean_ctor_get(x_5, 0);
lean_inc(x_6);
if (lean_is_exclusive(x_5)) {
 lean_ctor_release(x_5, 0);
 x_7 = x_5;
} else {
 lean_dec_ref(x_5);
 x_7 = lean_box(0);
}
if (lean_obj_tag(x_6) == 1)
{
uint8_t x_8; 
x_8 = !lean_is_exclusive(x_6);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10; uint8_t x_11; 
x_9 = lean_ctor_get(x_6, 0);
x_10 = lean_ctor_get(x_6, 1);
x_11 = lean_string_dec_eq(x_9, x_3);
if (x_11 == 0)
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; 
lean_free_object(x_6);
lean_dec(x_10);
x_12 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__0;
x_13 = lean_string_append(x_12, x_3);
lean_dec_ref(x_3);
x_14 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__1;
x_15 = lean_string_append(x_13, x_14);
x_16 = lean_string_append(x_15, x_9);
lean_dec_ref(x_9);
x_17 = l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__1;
x_18 = lean_string_append(x_16, x_17);
x_19 = lean_mk_io_user_error(x_18);
if (lean_is_scalar(x_7)) {
 x_20 = lean_alloc_ctor(1, 1, 0);
} else {
 x_20 = x_7;
 lean_ctor_set_tag(x_20, 1);
}
lean_ctor_set(x_20, 0, x_19);
return x_20;
}
else
{
lean_object* x_21; lean_object* x_22; 
lean_dec_ref(x_9);
x_21 = l_Option_toJson___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__0(x_10);
lean_inc(x_21);
x_22 = l_Lean_Lsp_instFromJsonLeanDidOpenTextDocumentParams_fromJson(x_21);
if (lean_obj_tag(x_22) == 0)
{
lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; 
lean_free_object(x_6);
x_23 = lean_ctor_get(x_22, 0);
lean_inc(x_23);
lean_dec_ref(x_22);
x_24 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__2;
x_25 = l_Lean_Json_compress(x_21);
x_26 = lean_string_append(x_24, x_25);
lean_dec_ref(x_25);
x_27 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__3;
x_28 = lean_string_append(x_26, x_27);
x_29 = lean_string_append(x_28, x_3);
lean_dec_ref(x_3);
x_30 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__4;
x_31 = lean_string_append(x_29, x_30);
x_32 = lean_string_append(x_31, x_23);
lean_dec(x_23);
x_33 = lean_mk_io_user_error(x_32);
if (lean_is_scalar(x_7)) {
 x_34 = lean_alloc_ctor(1, 1, 0);
} else {
 x_34 = x_7;
 lean_ctor_set_tag(x_34, 1);
}
lean_ctor_set(x_34, 0, x_33);
return x_34;
}
else
{
lean_object* x_35; lean_object* x_36; 
lean_dec(x_21);
x_35 = lean_ctor_get(x_22, 0);
lean_inc(x_35);
lean_dec_ref(x_22);
lean_ctor_set_tag(x_6, 0);
lean_ctor_set(x_6, 1, x_35);
lean_ctor_set(x_6, 0, x_3);
if (lean_is_scalar(x_7)) {
 x_36 = lean_alloc_ctor(0, 1, 0);
} else {
 x_36 = x_7;
}
lean_ctor_set(x_36, 0, x_6);
return x_36;
}
}
}
else
{
lean_object* x_37; lean_object* x_38; uint8_t x_39; 
x_37 = lean_ctor_get(x_6, 0);
x_38 = lean_ctor_get(x_6, 1);
lean_inc(x_38);
lean_inc(x_37);
lean_dec(x_6);
x_39 = lean_string_dec_eq(x_37, x_3);
if (x_39 == 0)
{
lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; 
lean_dec(x_38);
x_40 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__0;
x_41 = lean_string_append(x_40, x_3);
lean_dec_ref(x_3);
x_42 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__1;
x_43 = lean_string_append(x_41, x_42);
x_44 = lean_string_append(x_43, x_37);
lean_dec_ref(x_37);
x_45 = l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__1;
x_46 = lean_string_append(x_44, x_45);
x_47 = lean_mk_io_user_error(x_46);
if (lean_is_scalar(x_7)) {
 x_48 = lean_alloc_ctor(1, 1, 0);
} else {
 x_48 = x_7;
 lean_ctor_set_tag(x_48, 1);
}
lean_ctor_set(x_48, 0, x_47);
return x_48;
}
else
{
lean_object* x_49; lean_object* x_50; 
lean_dec_ref(x_37);
x_49 = l_Option_toJson___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__0(x_38);
lean_inc(x_49);
x_50 = l_Lean_Lsp_instFromJsonLeanDidOpenTextDocumentParams_fromJson(x_49);
if (lean_obj_tag(x_50) == 0)
{
lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; 
x_51 = lean_ctor_get(x_50, 0);
lean_inc(x_51);
lean_dec_ref(x_50);
x_52 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__2;
x_53 = l_Lean_Json_compress(x_49);
x_54 = lean_string_append(x_52, x_53);
lean_dec_ref(x_53);
x_55 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__3;
x_56 = lean_string_append(x_54, x_55);
x_57 = lean_string_append(x_56, x_3);
lean_dec_ref(x_3);
x_58 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__4;
x_59 = lean_string_append(x_57, x_58);
x_60 = lean_string_append(x_59, x_51);
lean_dec(x_51);
x_61 = lean_mk_io_user_error(x_60);
if (lean_is_scalar(x_7)) {
 x_62 = lean_alloc_ctor(1, 1, 0);
} else {
 x_62 = x_7;
 lean_ctor_set_tag(x_62, 1);
}
lean_ctor_set(x_62, 0, x_61);
return x_62;
}
else
{
lean_object* x_63; lean_object* x_64; lean_object* x_65; 
lean_dec(x_49);
x_63 = lean_ctor_get(x_50, 0);
lean_inc(x_63);
lean_dec_ref(x_50);
x_64 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_64, 0, x_3);
lean_ctor_set(x_64, 1, x_63);
if (lean_is_scalar(x_7)) {
 x_65 = lean_alloc_ctor(0, 1, 0);
} else {
 x_65 = x_7;
}
lean_ctor_set(x_65, 0, x_64);
return x_65;
}
}
}
}
else
{
lean_object* x_66; lean_object* x_67; lean_object* x_68; 
lean_dec_ref(x_3);
x_66 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__5;
x_67 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__3;
switch (lean_obj_tag(x_6)) {
case 0:
{
lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; 
x_78 = lean_ctor_get(x_6, 0);
lean_inc(x_78);
x_79 = lean_ctor_get(x_6, 1);
lean_inc_ref(x_79);
x_80 = lean_ctor_get(x_6, 2);
lean_inc(x_80);
lean_dec_ref(x_6);
x_81 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__4;
switch (lean_obj_tag(x_78)) {
case 0:
{
uint8_t x_94; 
x_94 = !lean_is_exclusive(x_78);
if (x_94 == 0)
{
lean_ctor_set_tag(x_78, 3);
x_82 = x_78;
goto block_93;
}
else
{
lean_object* x_95; lean_object* x_96; 
x_95 = lean_ctor_get(x_78, 0);
lean_inc(x_95);
lean_dec(x_78);
x_96 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_96, 0, x_95);
x_82 = x_96;
goto block_93;
}
}
case 1:
{
uint8_t x_97; 
x_97 = !lean_is_exclusive(x_78);
if (x_97 == 0)
{
lean_ctor_set_tag(x_78, 2);
x_82 = x_78;
goto block_93;
}
else
{
lean_object* x_98; lean_object* x_99; 
x_98 = lean_ctor_get(x_78, 0);
lean_inc(x_98);
lean_dec(x_78);
x_99 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_99, 0, x_98);
x_82 = x_99;
goto block_93;
}
}
default: 
{
lean_object* x_100; 
x_100 = lean_box(0);
x_82 = x_100;
goto block_93;
}
}
block_93:
{
lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; 
x_83 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_83, 0, x_81);
lean_ctor_set(x_83, 1, x_82);
x_84 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__5;
x_85 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_85, 0, x_79);
x_86 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_86, 0, x_84);
lean_ctor_set(x_86, 1, x_85);
x_87 = lean_box(0);
x_88 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_88, 0, x_86);
lean_ctor_set(x_88, 1, x_87);
x_89 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_89, 0, x_83);
lean_ctor_set(x_89, 1, x_88);
x_90 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__6;
x_91 = l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__0(x_90, x_80);
x_92 = l_List_appendTR___redArg(x_89, x_91);
x_68 = x_92;
goto block_77;
}
}
case 1:
{
lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; 
x_101 = lean_ctor_get(x_6, 0);
lean_inc_ref(x_101);
x_102 = lean_ctor_get(x_6, 1);
lean_inc(x_102);
lean_dec_ref(x_6);
x_103 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__5;
x_104 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_104, 0, x_101);
x_105 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_105, 0, x_103);
lean_ctor_set(x_105, 1, x_104);
x_106 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__6;
x_107 = l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__0(x_106, x_102);
x_108 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_108, 0, x_105);
lean_ctor_set(x_108, 1, x_107);
x_68 = x_108;
goto block_77;
}
case 2:
{
lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; 
x_109 = lean_ctor_get(x_6, 0);
lean_inc(x_109);
x_110 = lean_ctor_get(x_6, 1);
lean_inc(x_110);
lean_dec_ref(x_6);
x_111 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__4;
switch (lean_obj_tag(x_109)) {
case 0:
{
uint8_t x_120; 
x_120 = !lean_is_exclusive(x_109);
if (x_120 == 0)
{
lean_ctor_set_tag(x_109, 3);
x_112 = x_109;
goto block_119;
}
else
{
lean_object* x_121; lean_object* x_122; 
x_121 = lean_ctor_get(x_109, 0);
lean_inc(x_121);
lean_dec(x_109);
x_122 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_122, 0, x_121);
x_112 = x_122;
goto block_119;
}
}
case 1:
{
uint8_t x_123; 
x_123 = !lean_is_exclusive(x_109);
if (x_123 == 0)
{
lean_ctor_set_tag(x_109, 2);
x_112 = x_109;
goto block_119;
}
else
{
lean_object* x_124; lean_object* x_125; 
x_124 = lean_ctor_get(x_109, 0);
lean_inc(x_124);
lean_dec(x_109);
x_125 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_125, 0, x_124);
x_112 = x_125;
goto block_119;
}
}
default: 
{
lean_object* x_126; 
x_126 = lean_box(0);
x_112 = x_126;
goto block_119;
}
}
block_119:
{
lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; 
x_113 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_113, 0, x_111);
lean_ctor_set(x_113, 1, x_112);
x_114 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__7;
x_115 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_115, 0, x_114);
lean_ctor_set(x_115, 1, x_110);
x_116 = lean_box(0);
x_117 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_117, 0, x_115);
lean_ctor_set(x_117, 1, x_116);
x_118 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_118, 0, x_113);
lean_ctor_set(x_118, 1, x_117);
x_68 = x_118;
goto block_77;
}
}
default: 
{
lean_object* x_127; uint8_t x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_150; lean_object* x_151; 
x_127 = lean_ctor_get(x_6, 0);
lean_inc(x_127);
x_128 = lean_ctor_get_uint8(x_6, sizeof(void*)*3);
x_129 = lean_ctor_get(x_6, 1);
lean_inc_ref(x_129);
x_130 = lean_ctor_get(x_6, 2);
lean_inc(x_130);
lean_dec_ref(x_6);
x_150 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__4;
switch (lean_obj_tag(x_127)) {
case 0:
{
uint8_t x_168; 
x_168 = !lean_is_exclusive(x_127);
if (x_168 == 0)
{
lean_ctor_set_tag(x_127, 3);
x_151 = x_127;
goto block_167;
}
else
{
lean_object* x_169; lean_object* x_170; 
x_169 = lean_ctor_get(x_127, 0);
lean_inc(x_169);
lean_dec(x_127);
x_170 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_170, 0, x_169);
x_151 = x_170;
goto block_167;
}
}
case 1:
{
uint8_t x_171; 
x_171 = !lean_is_exclusive(x_127);
if (x_171 == 0)
{
lean_ctor_set_tag(x_127, 2);
x_151 = x_127;
goto block_167;
}
else
{
lean_object* x_172; lean_object* x_173; 
x_172 = lean_ctor_get(x_127, 0);
lean_inc(x_172);
lean_dec(x_127);
x_173 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_173, 0, x_172);
x_151 = x_173;
goto block_167;
}
}
default: 
{
lean_object* x_174; 
x_174 = lean_box(0);
x_151 = x_174;
goto block_167;
}
}
block_149:
{
lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; 
x_135 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_135, 0, x_133);
lean_ctor_set(x_135, 1, x_134);
x_136 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__8;
x_137 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_137, 0, x_129);
x_138 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_138, 0, x_136);
lean_ctor_set(x_138, 1, x_137);
x_139 = lean_box(0);
x_140 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_140, 0, x_138);
lean_ctor_set(x_140, 1, x_139);
x_141 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_141, 0, x_135);
lean_ctor_set(x_141, 1, x_140);
x_142 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__9;
x_143 = l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__1(x_142, x_130);
lean_dec(x_130);
x_144 = l_List_appendTR___redArg(x_141, x_143);
x_145 = l_Lean_Json_mkObj(x_144);
x_146 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_146, 0, x_132);
lean_ctor_set(x_146, 1, x_145);
x_147 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_147, 0, x_146);
lean_ctor_set(x_147, 1, x_139);
x_148 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_148, 0, x_131);
lean_ctor_set(x_148, 1, x_147);
x_68 = x_148;
goto block_77;
}
block_167:
{
lean_object* x_152; lean_object* x_153; lean_object* x_154; 
x_152 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_152, 0, x_150);
lean_ctor_set(x_152, 1, x_151);
x_153 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__10;
x_154 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__11;
switch (x_128) {
case 0:
{
lean_object* x_155; 
x_155 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__15;
x_131 = x_152;
x_132 = x_153;
x_133 = x_154;
x_134 = x_155;
goto block_149;
}
case 1:
{
lean_object* x_156; 
x_156 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__19;
x_131 = x_152;
x_132 = x_153;
x_133 = x_154;
x_134 = x_156;
goto block_149;
}
case 2:
{
lean_object* x_157; 
x_157 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__23;
x_131 = x_152;
x_132 = x_153;
x_133 = x_154;
x_134 = x_157;
goto block_149;
}
case 3:
{
lean_object* x_158; 
x_158 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__27;
x_131 = x_152;
x_132 = x_153;
x_133 = x_154;
x_134 = x_158;
goto block_149;
}
case 4:
{
lean_object* x_159; 
x_159 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__31;
x_131 = x_152;
x_132 = x_153;
x_133 = x_154;
x_134 = x_159;
goto block_149;
}
case 5:
{
lean_object* x_160; 
x_160 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__35;
x_131 = x_152;
x_132 = x_153;
x_133 = x_154;
x_134 = x_160;
goto block_149;
}
case 6:
{
lean_object* x_161; 
x_161 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__39;
x_131 = x_152;
x_132 = x_153;
x_133 = x_154;
x_134 = x_161;
goto block_149;
}
case 7:
{
lean_object* x_162; 
x_162 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__43;
x_131 = x_152;
x_132 = x_153;
x_133 = x_154;
x_134 = x_162;
goto block_149;
}
case 8:
{
lean_object* x_163; 
x_163 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__47;
x_131 = x_152;
x_132 = x_153;
x_133 = x_154;
x_134 = x_163;
goto block_149;
}
case 9:
{
lean_object* x_164; 
x_164 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__51;
x_131 = x_152;
x_132 = x_153;
x_133 = x_154;
x_134 = x_164;
goto block_149;
}
case 10:
{
lean_object* x_165; 
x_165 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__55;
x_131 = x_152;
x_132 = x_153;
x_133 = x_154;
x_134 = x_165;
goto block_149;
}
default: 
{
lean_object* x_166; 
x_166 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__59;
x_131 = x_152;
x_132 = x_153;
x_133 = x_154;
x_134 = x_166;
goto block_149;
}
}
}
}
}
block_77:
{
lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; 
x_69 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_69, 0, x_67);
lean_ctor_set(x_69, 1, x_68);
x_70 = l_Lean_Json_mkObj(x_69);
x_71 = l_Lean_Json_compress(x_70);
x_72 = lean_string_append(x_66, x_71);
lean_dec_ref(x_71);
x_73 = l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__1;
x_74 = lean_string_append(x_72, x_73);
x_75 = lean_mk_io_user_error(x_74);
if (lean_is_scalar(x_7)) {
 x_76 = lean_alloc_ctor(1, 1, 0);
} else {
 x_76 = x_7;
 lean_ctor_set_tag(x_76, 1);
}
lean_ctor_set(x_76, 0, x_75);
return x_76;
}
}
}
else
{
uint8_t x_175; 
lean_dec_ref(x_3);
x_175 = !lean_is_exclusive(x_5);
if (x_175 == 0)
{
return x_5;
}
else
{
lean_object* x_176; lean_object* x_177; 
x_176 = lean_ctor_get(x_5, 0);
lean_inc(x_176);
lean_dec(x_5);
x_177 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_177, 0, x_176);
return x_177;
}
}
}
}
LEAN_EXPORT lean_object* l_IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_12; 
lean_inc_ref(x_1);
x_12 = l___private_Lean_Data_Lsp_Communication_0__IO_FS_Stream_readLspHeader(x_1);
if (lean_obj_tag(x_12) == 0)
{
lean_object* x_13; lean_object* x_14; 
x_13 = lean_ctor_get(x_12, 0);
lean_inc(x_13);
lean_dec_ref(x_12);
x_14 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12(x_1, x_13, x_2);
lean_dec(x_13);
if (lean_obj_tag(x_14) == 0)
{
return x_14;
}
else
{
lean_object* x_15; 
x_15 = lean_ctor_get(x_14, 0);
lean_inc(x_15);
lean_dec_ref(x_14);
x_4 = x_15;
x_5 = lean_box(0);
goto block_11;
}
}
else
{
lean_object* x_16; 
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_16 = lean_ctor_get(x_12, 0);
lean_inc(x_16);
lean_dec_ref(x_12);
x_4 = x_16;
x_5 = lean_box(0);
goto block_11;
}
block_11:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
x_6 = l_IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12___closed__0;
x_7 = lean_io_error_to_string(x_4);
x_8 = lean_string_append(x_6, x_7);
lean_dec_ref(x_7);
x_9 = lean_mk_io_user_error(x_8);
x_10 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_10, 0, x_9);
return x_10;
}
}
}
static lean_object* _init_l_IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Cannot read LSP request: ", 25, 25);
return x_1;
}
}
static lean_object* _init_l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("capabilities", 12, 12);
return x_1;
}
}
static lean_object* _init_l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("processId", 9, 9);
return x_1;
}
}
static lean_object* _init_l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("clientInfo", 10, 10);
return x_1;
}
}
static lean_object* _init_l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__3() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("rootUri", 7, 7);
return x_1;
}
}
static lean_object* _init_l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__4() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("initializationOptions", 21, 21);
return x_1;
}
}
static lean_object* _init_l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__5() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("workspaceFolders", 16, 16);
return x_1;
}
}
static lean_object* _init_l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__6() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("trace", 5, 5);
return x_1;
}
}
static lean_object* _init_l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("unknown trace", 13, 13);
return x_1;
}
}
static lean_object* _init_l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__0;
x_2 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("off", 3, 3);
return x_1;
}
}
static lean_object* _init_l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__3() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("messages", 8, 8);
return x_1;
}
}
static lean_object* _init_l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__4() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("verbose", 7, 7);
return x_1;
}
}
static lean_object* _init_l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__5() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3; 
x_1 = 2;
x_2 = lean_box(x_1);
x_3 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_3, 0, x_2);
return x_3;
}
}
static lean_object* _init_l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__6() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3; 
x_1 = 1;
x_2 = lean_box(x_1);
x_3 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_3, 0, x_2);
return x_3;
}
}
static lean_object* _init_l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__7() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3; 
x_1 = 0;
x_2 = lean_box(x_1);
x_3 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_3, 0, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_5; lean_object* x_6; 
x_5 = l_Lean_Json_getObjValD(x_1, x_2);
x_6 = l_Lean_Json_getStr_x3f(x_5);
if (lean_obj_tag(x_6) == 1)
{
lean_object* x_7; lean_object* x_8; uint8_t x_9; 
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
lean_dec_ref(x_6);
x_8 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__2;
x_9 = lean_string_dec_eq(x_7, x_8);
if (x_9 == 0)
{
lean_object* x_10; uint8_t x_11; 
x_10 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__3;
x_11 = lean_string_dec_eq(x_7, x_10);
if (x_11 == 0)
{
lean_object* x_12; uint8_t x_13; 
x_12 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__4;
x_13 = lean_string_dec_eq(x_7, x_12);
lean_dec(x_7);
if (x_13 == 0)
{
goto block_4;
}
else
{
lean_object* x_14; 
x_14 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__5;
return x_14;
}
}
else
{
lean_object* x_15; 
lean_dec(x_7);
x_15 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__6;
return x_15;
}
}
else
{
lean_object* x_16; 
lean_dec(x_7);
x_16 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__7;
return x_16;
}
}
else
{
lean_dec_ref(x_6);
goto block_4;
}
block_4:
{
lean_object* x_3; 
x_3 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__1;
return x_3;
}
}
}
static lean_object* _init_l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__7() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Expected JSON-RPC request, got: '", 33, 33);
return x_1;
}
}
LEAN_EXPORT lean_object* l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_5; 
x_5 = l_IO_FS_Stream_readMessage(x_1, x_2);
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_6; lean_object* x_7; 
x_6 = lean_ctor_get(x_5, 0);
lean_inc(x_6);
if (lean_is_exclusive(x_5)) {
 lean_ctor_release(x_5, 0);
 x_7 = x_5;
} else {
 lean_dec_ref(x_5);
 x_7 = lean_box(0);
}
if (lean_obj_tag(x_6) == 0)
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; 
x_8 = lean_ctor_get(x_6, 0);
lean_inc(x_8);
x_9 = lean_ctor_get(x_6, 1);
lean_inc_ref(x_9);
x_10 = lean_ctor_get(x_6, 2);
lean_inc(x_10);
if (lean_is_exclusive(x_6)) {
 lean_ctor_release(x_6, 0);
 lean_ctor_release(x_6, 1);
 lean_ctor_release(x_6, 2);
 x_11 = x_6;
} else {
 lean_dec_ref(x_6);
 x_11 = lean_box(0);
}
x_12 = lean_string_dec_eq(x_9, x_3);
if (x_12 == 0)
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; 
lean_dec(x_11);
lean_dec(x_10);
lean_dec(x_8);
x_13 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__0;
x_14 = lean_string_append(x_13, x_3);
lean_dec_ref(x_3);
x_15 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__1;
x_16 = lean_string_append(x_14, x_15);
x_17 = lean_string_append(x_16, x_9);
lean_dec_ref(x_9);
x_18 = l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__1;
x_19 = lean_string_append(x_17, x_18);
x_20 = lean_mk_io_user_error(x_19);
if (lean_is_scalar(x_7)) {
 x_21 = lean_alloc_ctor(1, 1, 0);
} else {
 x_21 = x_7;
 lean_ctor_set_tag(x_21, 1);
}
lean_ctor_set(x_21, 0, x_20);
return x_21;
}
else
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; 
lean_dec_ref(x_9);
x_22 = l_Option_toJson___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__0(x_10);
x_23 = l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__0;
lean_inc(x_22);
x_24 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__1(x_22, x_23);
if (lean_obj_tag(x_24) == 0)
{
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; 
lean_dec(x_11);
lean_dec(x_8);
x_25 = lean_ctor_get(x_24, 0);
lean_inc(x_25);
lean_dec_ref(x_24);
x_26 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__2;
x_27 = l_Lean_Json_compress(x_22);
x_28 = lean_string_append(x_26, x_27);
lean_dec_ref(x_27);
x_29 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__3;
x_30 = lean_string_append(x_28, x_29);
x_31 = lean_string_append(x_30, x_3);
lean_dec_ref(x_3);
x_32 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__4;
x_33 = lean_string_append(x_31, x_32);
x_34 = lean_string_append(x_33, x_25);
lean_dec(x_25);
x_35 = lean_mk_io_user_error(x_34);
if (lean_is_scalar(x_7)) {
 x_36 = lean_alloc_ctor(1, 1, 0);
} else {
 x_36 = x_7;
 lean_ctor_set_tag(x_36, 1);
}
lean_ctor_set(x_36, 0, x_35);
return x_36;
}
else
{
lean_object* x_37; uint8_t x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; uint8_t x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; uint8_t x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; uint8_t x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; uint8_t x_86; lean_object* x_87; lean_object* x_88; uint8_t x_94; lean_object* x_102; lean_object* x_103; 
x_37 = lean_ctor_get(x_24, 0);
lean_inc(x_37);
lean_dec_ref(x_24);
x_59 = l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__1;
lean_inc(x_22);
x_60 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__2(x_22, x_59);
x_61 = l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__2;
lean_inc(x_22);
x_62 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__3(x_22, x_61);
x_63 = l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__3;
lean_inc(x_22);
x_64 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__4(x_22, x_63);
x_65 = l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__4;
lean_inc(x_22);
x_66 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__5(x_22, x_65);
x_102 = l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__6;
lean_inc(x_22);
x_103 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9(x_22, x_102);
if (lean_obj_tag(x_103) == 0)
{
uint8_t x_104; 
lean_dec_ref(x_103);
x_104 = 0;
x_94 = x_104;
goto block_101;
}
else
{
lean_object* x_105; uint8_t x_106; 
x_105 = lean_ctor_get(x_103, 0);
lean_inc(x_105);
lean_dec_ref(x_103);
x_106 = lean_unbox(x_105);
lean_dec(x_105);
x_94 = x_106;
goto block_101;
}
block_47:
{
lean_object* x_44; lean_object* x_45; lean_object* x_46; 
x_44 = lean_alloc_ctor(0, 6, 1);
lean_ctor_set(x_44, 0, x_41);
lean_ctor_set(x_44, 1, x_40);
lean_ctor_set(x_44, 2, x_39);
lean_ctor_set(x_44, 3, x_42);
lean_ctor_set(x_44, 4, x_37);
lean_ctor_set(x_44, 5, x_43);
lean_ctor_set_uint8(x_44, sizeof(void*)*6, x_38);
if (lean_is_scalar(x_11)) {
 x_45 = lean_alloc_ctor(0, 3, 0);
} else {
 x_45 = x_11;
}
lean_ctor_set(x_45, 0, x_8);
lean_ctor_set(x_45, 1, x_3);
lean_ctor_set(x_45, 2, x_44);
if (lean_is_scalar(x_7)) {
 x_46 = lean_alloc_ctor(0, 1, 0);
} else {
 x_46 = x_7;
}
lean_ctor_set(x_46, 0, x_45);
return x_46;
}
block_58:
{
if (lean_obj_tag(x_51) == 0)
{
lean_object* x_54; 
lean_dec_ref(x_51);
x_54 = lean_box(0);
x_38 = x_48;
x_39 = x_49;
x_40 = x_50;
x_41 = x_52;
x_42 = x_53;
x_43 = x_54;
goto block_47;
}
else
{
uint8_t x_55; 
x_55 = !lean_is_exclusive(x_51);
if (x_55 == 0)
{
x_38 = x_48;
x_39 = x_49;
x_40 = x_50;
x_41 = x_52;
x_42 = x_53;
x_43 = x_51;
goto block_47;
}
else
{
lean_object* x_56; lean_object* x_57; 
x_56 = lean_ctor_get(x_51, 0);
lean_inc(x_56);
lean_dec(x_51);
x_57 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_57, 0, x_56);
x_38 = x_48;
x_39 = x_49;
x_40 = x_50;
x_41 = x_52;
x_42 = x_53;
x_43 = x_57;
goto block_47;
}
}
}
block_76:
{
if (lean_obj_tag(x_66) == 0)
{
lean_object* x_72; 
lean_dec_ref(x_66);
x_72 = lean_box(0);
x_48 = x_67;
x_49 = x_71;
x_50 = x_68;
x_51 = x_69;
x_52 = x_70;
x_53 = x_72;
goto block_58;
}
else
{
uint8_t x_73; 
x_73 = !lean_is_exclusive(x_66);
if (x_73 == 0)
{
x_48 = x_67;
x_49 = x_71;
x_50 = x_68;
x_51 = x_69;
x_52 = x_70;
x_53 = x_66;
goto block_58;
}
else
{
lean_object* x_74; lean_object* x_75; 
x_74 = lean_ctor_get(x_66, 0);
lean_inc(x_74);
lean_dec(x_66);
x_75 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_75, 0, x_74);
x_48 = x_67;
x_49 = x_71;
x_50 = x_68;
x_51 = x_69;
x_52 = x_70;
x_53 = x_75;
goto block_58;
}
}
}
block_85:
{
if (lean_obj_tag(x_64) == 0)
{
lean_object* x_81; 
lean_dec_ref(x_64);
x_81 = lean_box(0);
x_67 = x_77;
x_68 = x_80;
x_69 = x_78;
x_70 = x_79;
x_71 = x_81;
goto block_76;
}
else
{
uint8_t x_82; 
x_82 = !lean_is_exclusive(x_64);
if (x_82 == 0)
{
x_67 = x_77;
x_68 = x_80;
x_69 = x_78;
x_70 = x_79;
x_71 = x_64;
goto block_76;
}
else
{
lean_object* x_83; lean_object* x_84; 
x_83 = lean_ctor_get(x_64, 0);
lean_inc(x_83);
lean_dec(x_64);
x_84 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_84, 0, x_83);
x_67 = x_77;
x_68 = x_80;
x_69 = x_78;
x_70 = x_79;
x_71 = x_84;
goto block_76;
}
}
}
block_93:
{
if (lean_obj_tag(x_62) == 0)
{
lean_object* x_89; 
lean_dec_ref(x_62);
x_89 = lean_box(0);
x_77 = x_86;
x_78 = x_87;
x_79 = x_88;
x_80 = x_89;
goto block_85;
}
else
{
uint8_t x_90; 
x_90 = !lean_is_exclusive(x_62);
if (x_90 == 0)
{
x_77 = x_86;
x_78 = x_87;
x_79 = x_88;
x_80 = x_62;
goto block_85;
}
else
{
lean_object* x_91; lean_object* x_92; 
x_91 = lean_ctor_get(x_62, 0);
lean_inc(x_91);
lean_dec(x_62);
x_92 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_92, 0, x_91);
x_77 = x_86;
x_78 = x_87;
x_79 = x_88;
x_80 = x_92;
goto block_85;
}
}
}
block_101:
{
lean_object* x_95; lean_object* x_96; 
x_95 = l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__5;
x_96 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__6(x_22, x_95);
if (lean_obj_tag(x_60) == 0)
{
lean_object* x_97; 
lean_dec_ref(x_60);
x_97 = lean_box(0);
x_86 = x_94;
x_87 = x_96;
x_88 = x_97;
goto block_93;
}
else
{
uint8_t x_98; 
x_98 = !lean_is_exclusive(x_60);
if (x_98 == 0)
{
x_86 = x_94;
x_87 = x_96;
x_88 = x_60;
goto block_93;
}
else
{
lean_object* x_99; lean_object* x_100; 
x_99 = lean_ctor_get(x_60, 0);
lean_inc(x_99);
lean_dec(x_60);
x_100 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_100, 0, x_99);
x_86 = x_94;
x_87 = x_96;
x_88 = x_100;
goto block_93;
}
}
}
}
}
}
else
{
lean_object* x_107; lean_object* x_108; lean_object* x_109; 
lean_dec_ref(x_3);
x_107 = l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__7;
x_108 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__3;
switch (lean_obj_tag(x_6)) {
case 0:
{
lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; 
x_119 = lean_ctor_get(x_6, 0);
lean_inc(x_119);
x_120 = lean_ctor_get(x_6, 1);
lean_inc_ref(x_120);
x_121 = lean_ctor_get(x_6, 2);
lean_inc(x_121);
lean_dec_ref(x_6);
x_122 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__4;
switch (lean_obj_tag(x_119)) {
case 0:
{
uint8_t x_135; 
x_135 = !lean_is_exclusive(x_119);
if (x_135 == 0)
{
lean_ctor_set_tag(x_119, 3);
x_123 = x_119;
goto block_134;
}
else
{
lean_object* x_136; lean_object* x_137; 
x_136 = lean_ctor_get(x_119, 0);
lean_inc(x_136);
lean_dec(x_119);
x_137 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_137, 0, x_136);
x_123 = x_137;
goto block_134;
}
}
case 1:
{
uint8_t x_138; 
x_138 = !lean_is_exclusive(x_119);
if (x_138 == 0)
{
lean_ctor_set_tag(x_119, 2);
x_123 = x_119;
goto block_134;
}
else
{
lean_object* x_139; lean_object* x_140; 
x_139 = lean_ctor_get(x_119, 0);
lean_inc(x_139);
lean_dec(x_119);
x_140 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_140, 0, x_139);
x_123 = x_140;
goto block_134;
}
}
default: 
{
lean_object* x_141; 
x_141 = lean_box(0);
x_123 = x_141;
goto block_134;
}
}
block_134:
{
lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; 
x_124 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_124, 0, x_122);
lean_ctor_set(x_124, 1, x_123);
x_125 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__5;
x_126 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_126, 0, x_120);
x_127 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_127, 0, x_125);
lean_ctor_set(x_127, 1, x_126);
x_128 = lean_box(0);
x_129 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_129, 0, x_127);
lean_ctor_set(x_129, 1, x_128);
x_130 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_130, 0, x_124);
lean_ctor_set(x_130, 1, x_129);
x_131 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__6;
x_132 = l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__0(x_131, x_121);
x_133 = l_List_appendTR___redArg(x_130, x_132);
x_109 = x_133;
goto block_118;
}
}
case 1:
{
lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; 
x_142 = lean_ctor_get(x_6, 0);
lean_inc_ref(x_142);
x_143 = lean_ctor_get(x_6, 1);
lean_inc(x_143);
lean_dec_ref(x_6);
x_144 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__5;
x_145 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_145, 0, x_142);
x_146 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_146, 0, x_144);
lean_ctor_set(x_146, 1, x_145);
x_147 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__6;
x_148 = l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__0(x_147, x_143);
x_149 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_149, 0, x_146);
lean_ctor_set(x_149, 1, x_148);
x_109 = x_149;
goto block_118;
}
case 2:
{
lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; 
x_150 = lean_ctor_get(x_6, 0);
lean_inc(x_150);
x_151 = lean_ctor_get(x_6, 1);
lean_inc(x_151);
lean_dec_ref(x_6);
x_152 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__4;
switch (lean_obj_tag(x_150)) {
case 0:
{
uint8_t x_161; 
x_161 = !lean_is_exclusive(x_150);
if (x_161 == 0)
{
lean_ctor_set_tag(x_150, 3);
x_153 = x_150;
goto block_160;
}
else
{
lean_object* x_162; lean_object* x_163; 
x_162 = lean_ctor_get(x_150, 0);
lean_inc(x_162);
lean_dec(x_150);
x_163 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_163, 0, x_162);
x_153 = x_163;
goto block_160;
}
}
case 1:
{
uint8_t x_164; 
x_164 = !lean_is_exclusive(x_150);
if (x_164 == 0)
{
lean_ctor_set_tag(x_150, 2);
x_153 = x_150;
goto block_160;
}
else
{
lean_object* x_165; lean_object* x_166; 
x_165 = lean_ctor_get(x_150, 0);
lean_inc(x_165);
lean_dec(x_150);
x_166 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_166, 0, x_165);
x_153 = x_166;
goto block_160;
}
}
default: 
{
lean_object* x_167; 
x_167 = lean_box(0);
x_153 = x_167;
goto block_160;
}
}
block_160:
{
lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; 
x_154 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_154, 0, x_152);
lean_ctor_set(x_154, 1, x_153);
x_155 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__7;
x_156 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_156, 0, x_155);
lean_ctor_set(x_156, 1, x_151);
x_157 = lean_box(0);
x_158 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_158, 0, x_156);
lean_ctor_set(x_158, 1, x_157);
x_159 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_159, 0, x_154);
lean_ctor_set(x_159, 1, x_158);
x_109 = x_159;
goto block_118;
}
}
default: 
{
lean_object* x_168; uint8_t x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_191; lean_object* x_192; 
x_168 = lean_ctor_get(x_6, 0);
lean_inc(x_168);
x_169 = lean_ctor_get_uint8(x_6, sizeof(void*)*3);
x_170 = lean_ctor_get(x_6, 1);
lean_inc_ref(x_170);
x_171 = lean_ctor_get(x_6, 2);
lean_inc(x_171);
lean_dec_ref(x_6);
x_191 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__4;
switch (lean_obj_tag(x_168)) {
case 0:
{
uint8_t x_209; 
x_209 = !lean_is_exclusive(x_168);
if (x_209 == 0)
{
lean_ctor_set_tag(x_168, 3);
x_192 = x_168;
goto block_208;
}
else
{
lean_object* x_210; lean_object* x_211; 
x_210 = lean_ctor_get(x_168, 0);
lean_inc(x_210);
lean_dec(x_168);
x_211 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_211, 0, x_210);
x_192 = x_211;
goto block_208;
}
}
case 1:
{
uint8_t x_212; 
x_212 = !lean_is_exclusive(x_168);
if (x_212 == 0)
{
lean_ctor_set_tag(x_168, 2);
x_192 = x_168;
goto block_208;
}
else
{
lean_object* x_213; lean_object* x_214; 
x_213 = lean_ctor_get(x_168, 0);
lean_inc(x_213);
lean_dec(x_168);
x_214 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_214, 0, x_213);
x_192 = x_214;
goto block_208;
}
}
default: 
{
lean_object* x_215; 
x_215 = lean_box(0);
x_192 = x_215;
goto block_208;
}
}
block_190:
{
lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; 
x_176 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_176, 0, x_174);
lean_ctor_set(x_176, 1, x_175);
x_177 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__8;
x_178 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_178, 0, x_170);
x_179 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_179, 0, x_177);
lean_ctor_set(x_179, 1, x_178);
x_180 = lean_box(0);
x_181 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_181, 0, x_179);
lean_ctor_set(x_181, 1, x_180);
x_182 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_182, 0, x_176);
lean_ctor_set(x_182, 1, x_181);
x_183 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__9;
x_184 = l_Lean_Json_opt___at___00Lean_Server_FileWorker_OutputMessage_ofMsg_spec__1(x_183, x_171);
lean_dec(x_171);
x_185 = l_List_appendTR___redArg(x_182, x_184);
x_186 = l_Lean_Json_mkObj(x_185);
x_187 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_187, 0, x_173);
lean_ctor_set(x_187, 1, x_186);
x_188 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_188, 0, x_187);
lean_ctor_set(x_188, 1, x_180);
x_189 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_189, 0, x_172);
lean_ctor_set(x_189, 1, x_188);
x_109 = x_189;
goto block_118;
}
block_208:
{
lean_object* x_193; lean_object* x_194; lean_object* x_195; 
x_193 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_193, 0, x_191);
lean_ctor_set(x_193, 1, x_192);
x_194 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__10;
x_195 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__11;
switch (x_169) {
case 0:
{
lean_object* x_196; 
x_196 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__15;
x_172 = x_193;
x_173 = x_194;
x_174 = x_195;
x_175 = x_196;
goto block_190;
}
case 1:
{
lean_object* x_197; 
x_197 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__19;
x_172 = x_193;
x_173 = x_194;
x_174 = x_195;
x_175 = x_197;
goto block_190;
}
case 2:
{
lean_object* x_198; 
x_198 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__23;
x_172 = x_193;
x_173 = x_194;
x_174 = x_195;
x_175 = x_198;
goto block_190;
}
case 3:
{
lean_object* x_199; 
x_199 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__27;
x_172 = x_193;
x_173 = x_194;
x_174 = x_195;
x_175 = x_199;
goto block_190;
}
case 4:
{
lean_object* x_200; 
x_200 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__31;
x_172 = x_193;
x_173 = x_194;
x_174 = x_195;
x_175 = x_200;
goto block_190;
}
case 5:
{
lean_object* x_201; 
x_201 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__35;
x_172 = x_193;
x_173 = x_194;
x_174 = x_195;
x_175 = x_201;
goto block_190;
}
case 6:
{
lean_object* x_202; 
x_202 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__39;
x_172 = x_193;
x_173 = x_194;
x_174 = x_195;
x_175 = x_202;
goto block_190;
}
case 7:
{
lean_object* x_203; 
x_203 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__43;
x_172 = x_193;
x_173 = x_194;
x_174 = x_195;
x_175 = x_203;
goto block_190;
}
case 8:
{
lean_object* x_204; 
x_204 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__47;
x_172 = x_193;
x_173 = x_194;
x_174 = x_195;
x_175 = x_204;
goto block_190;
}
case 9:
{
lean_object* x_205; 
x_205 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__51;
x_172 = x_193;
x_173 = x_194;
x_174 = x_195;
x_175 = x_205;
goto block_190;
}
case 10:
{
lean_object* x_206; 
x_206 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__55;
x_172 = x_193;
x_173 = x_194;
x_174 = x_195;
x_175 = x_206;
goto block_190;
}
default: 
{
lean_object* x_207; 
x_207 = l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__59;
x_172 = x_193;
x_173 = x_194;
x_174 = x_195;
x_175 = x_207;
goto block_190;
}
}
}
}
}
block_118:
{
lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; 
x_110 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_110, 0, x_108);
lean_ctor_set(x_110, 1, x_109);
x_111 = l_Lean_Json_mkObj(x_110);
x_112 = l_Lean_Json_compress(x_111);
x_113 = lean_string_append(x_107, x_112);
lean_dec_ref(x_112);
x_114 = l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__1;
x_115 = lean_string_append(x_113, x_114);
x_116 = lean_mk_io_user_error(x_115);
if (lean_is_scalar(x_7)) {
 x_117 = lean_alloc_ctor(1, 1, 0);
} else {
 x_117 = x_7;
 lean_ctor_set_tag(x_117, 1);
}
lean_ctor_set(x_117, 0, x_116);
return x_117;
}
}
}
else
{
uint8_t x_216; 
lean_dec_ref(x_3);
x_216 = !lean_is_exclusive(x_5);
if (x_216 == 0)
{
return x_5;
}
else
{
lean_object* x_217; lean_object* x_218; 
x_217 = lean_ctor_get(x_5, 0);
lean_inc(x_217);
lean_dec(x_5);
x_218 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_218, 0, x_217);
return x_218;
}
}
}
}
LEAN_EXPORT lean_object* l_IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_4; lean_object* x_5; lean_object* x_12; 
lean_inc_ref(x_1);
x_12 = l___private_Lean_Data_Lsp_Communication_0__IO_FS_Stream_readLspHeader(x_1);
if (lean_obj_tag(x_12) == 0)
{
lean_object* x_13; lean_object* x_14; 
x_13 = lean_ctor_get(x_12, 0);
lean_inc(x_13);
lean_dec_ref(x_12);
x_14 = l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0(x_1, x_13, x_2);
lean_dec(x_13);
if (lean_obj_tag(x_14) == 0)
{
return x_14;
}
else
{
lean_object* x_15; 
x_15 = lean_ctor_get(x_14, 0);
lean_inc(x_15);
lean_dec_ref(x_14);
x_4 = x_15;
x_5 = lean_box(0);
goto block_11;
}
}
else
{
lean_object* x_16; 
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_16 = lean_ctor_get(x_12, 0);
lean_inc(x_16);
lean_dec_ref(x_12);
x_4 = x_16;
x_5 = lean_box(0);
goto block_11;
}
block_11:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
x_6 = l_IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0___closed__0;
x_7 = lean_io_error_to_string(x_4);
x_8 = lean_string_append(x_6, x_7);
lean_dec_ref(x_7);
x_9 = lean_mk_io_user_error(x_8);
x_10 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_10, 0, x_9);
return x_10;
}
}
}
static lean_object* _init_l_Lean_Server_FileWorker_initAndRunWorker___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("initialize", 10, 10);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_initAndRunWorker___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("textDocument/didOpen", 20, 20);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_initAndRunWorker___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("[", 1, 1);
return x_1;
}
}
static lean_object* _init_l_Lean_Server_FileWorker_initAndRunWorker___closed__3() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("] ", 2, 2);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initAndRunWorker(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_25; lean_object* x_26; lean_object* x_30; lean_object* x_31; 
x_30 = l_Lean_Server_FileWorker_initAndRunWorker___closed__0;
lean_inc_ref(x_1);
x_31 = l_IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0(x_1, x_30);
if (lean_obj_tag(x_31) == 0)
{
lean_object* x_32; lean_object* x_33; lean_object* x_34; 
x_32 = lean_ctor_get(x_31, 0);
lean_inc(x_32);
lean_dec_ref(x_31);
x_33 = l_Lean_Server_FileWorker_initAndRunWorker___closed__1;
lean_inc_ref(x_1);
x_34 = l_IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12(x_1, x_33);
if (lean_obj_tag(x_34) == 0)
{
lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; 
x_35 = lean_ctor_get(x_34, 0);
lean_inc(x_35);
lean_dec_ref(x_34);
x_36 = lean_ctor_get(x_35, 1);
lean_inc(x_36);
lean_dec(x_35);
x_37 = lean_ctor_get(x_36, 0);
lean_inc_ref(x_37);
x_38 = lean_ctor_get(x_36, 1);
lean_inc(x_38);
lean_dec(x_36);
x_39 = lean_ctor_get(x_37, 0);
lean_inc_ref(x_39);
x_40 = lean_ctor_get(x_37, 2);
lean_inc(x_40);
x_41 = lean_ctor_get(x_37, 3);
lean_inc_ref(x_41);
lean_dec_ref(x_37);
x_42 = l_Lean_Server_moduleFromDocumentUri(x_39);
if (lean_obj_tag(x_42) == 0)
{
lean_object* x_43; lean_object* x_44; lean_object* x_45; uint8_t x_46; 
x_43 = lean_ctor_get(x_42, 0);
lean_inc(x_43);
lean_dec_ref(x_42);
x_44 = l_String_crlfToLf(x_41);
lean_dec_ref(x_41);
x_45 = l_String_toFileMap(x_44);
if (lean_obj_tag(x_38) == 0)
{
uint8_t x_77; 
x_77 = 0;
x_46 = x_77;
goto block_76;
}
else
{
lean_object* x_78; uint8_t x_79; 
x_78 = lean_ctor_get(x_38, 0);
lean_inc(x_78);
lean_dec_ref(x_38);
x_79 = lean_unbox(x_78);
lean_dec(x_78);
x_46 = x_79;
goto block_76;
}
block_76:
{
lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; 
x_47 = l_Lean_Server_FileWorker_initAndRunWorker___closed__2;
x_48 = lean_string_append(x_47, x_39);
x_49 = l_Lean_Server_FileWorker_initAndRunWorker___closed__3;
x_50 = lean_string_append(x_48, x_49);
x_51 = l_IO_FS_Stream_withPrefix(x_3, x_50);
lean_inc_ref(x_51);
x_52 = lean_get_set_stderr(x_51);
lean_dec_ref(x_52);
x_53 = lean_ctor_get(x_32, 2);
lean_inc(x_53);
lean_dec(x_32);
x_54 = lean_alloc_ctor(0, 4, 1);
lean_ctor_set(x_54, 0, x_39);
lean_ctor_set(x_54, 1, x_43);
lean_ctor_set(x_54, 2, x_40);
lean_ctor_set(x_54, 3, x_45);
lean_ctor_set_uint8(x_54, sizeof(void*)*4, x_46);
lean_inc_ref(x_2);
lean_inc_ref(x_54);
x_55 = l_Lean_Server_FileWorker_initializeWorker(x_54, x_2, x_51, x_53, x_4);
if (lean_obj_tag(x_55) == 0)
{
lean_dec_ref(x_54);
if (lean_obj_tag(x_55) == 0)
{
lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; 
x_56 = lean_ctor_get(x_55, 0);
lean_inc(x_56);
lean_dec_ref(x_55);
x_57 = lean_ctor_get(x_56, 0);
lean_inc(x_57);
x_58 = lean_ctor_get(x_56, 1);
lean_inc(x_58);
lean_dec(x_56);
x_59 = lean_st_mk_ref(x_58);
lean_inc(x_57);
x_60 = l_Lean_Server_FileWorker_runRefreshTasks(x_57, x_59);
if (lean_obj_tag(x_60) == 0)
{
lean_object* x_61; lean_object* x_62; 
x_61 = lean_ctor_get(x_60, 0);
lean_inc(x_61);
lean_dec_ref(x_60);
lean_inc(x_59);
x_62 = l_Lean_Server_FileWorker_mainLoop(x_1, x_57, x_59);
if (lean_obj_tag(x_62) == 0)
{
lean_object* x_63; size_t x_64; size_t x_65; lean_object* x_66; 
lean_dec_ref(x_62);
lean_dec_ref(x_2);
x_63 = lean_box(0);
x_64 = lean_array_size(x_61);
x_65 = 0;
x_66 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initAndRunWorker_spec__14___redArg(x_63, x_61, x_64, x_65, x_63);
lean_dec(x_61);
lean_dec_ref(x_66);
x_6 = x_59;
x_7 = x_63;
x_8 = lean_box(0);
goto block_11;
}
else
{
lean_dec(x_61);
x_25 = x_59;
x_26 = x_62;
goto block_29;
}
}
else
{
lean_object* x_67; 
lean_dec(x_57);
lean_dec_ref(x_1);
x_67 = lean_ctor_get(x_60, 0);
lean_inc(x_67);
lean_dec_ref(x_60);
x_12 = x_59;
x_13 = x_67;
x_14 = lean_box(0);
goto block_24;
}
}
else
{
uint8_t x_68; 
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_68 = !lean_is_exclusive(x_55);
if (x_68 == 0)
{
lean_ctor_set_tag(x_55, 1);
return x_55;
}
else
{
lean_object* x_69; lean_object* x_70; 
x_69 = lean_ctor_get(x_55, 0);
lean_inc(x_69);
lean_dec(x_55);
x_70 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_70, 0, x_69);
return x_70;
}
}
}
else
{
lean_object* x_71; lean_object* x_72; 
lean_dec_ref(x_1);
x_71 = lean_ctor_get(x_55, 0);
lean_inc(x_71);
lean_dec_ref(x_55);
lean_inc(x_71);
x_72 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initAndRunWorker_writeErrorDiag(x_2, x_54, x_71);
if (lean_obj_tag(x_72) == 0)
{
uint8_t x_73; 
x_73 = !lean_is_exclusive(x_72);
if (x_73 == 0)
{
lean_object* x_74; 
x_74 = lean_ctor_get(x_72, 0);
lean_dec(x_74);
lean_ctor_set_tag(x_72, 1);
lean_ctor_set(x_72, 0, x_71);
return x_72;
}
else
{
lean_object* x_75; 
lean_dec(x_72);
x_75 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_75, 0, x_71);
return x_75;
}
}
else
{
lean_dec(x_71);
return x_72;
}
}
}
}
else
{
uint8_t x_80; 
lean_dec_ref(x_41);
lean_dec(x_40);
lean_dec_ref(x_39);
lean_dec(x_38);
lean_dec(x_32);
lean_dec(x_4);
lean_dec_ref(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_80 = !lean_is_exclusive(x_42);
if (x_80 == 0)
{
return x_42;
}
else
{
lean_object* x_81; lean_object* x_82; 
x_81 = lean_ctor_get(x_42, 0);
lean_inc(x_81);
lean_dec(x_42);
x_82 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_82, 0, x_81);
return x_82;
}
}
}
else
{
uint8_t x_83; 
lean_dec(x_32);
lean_dec(x_4);
lean_dec_ref(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_83 = !lean_is_exclusive(x_34);
if (x_83 == 0)
{
return x_34;
}
else
{
lean_object* x_84; lean_object* x_85; 
x_84 = lean_ctor_get(x_34, 0);
lean_inc(x_84);
lean_dec(x_34);
x_85 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_85, 0, x_84);
return x_85;
}
}
}
else
{
uint8_t x_86; 
lean_dec(x_4);
lean_dec_ref(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_86 = !lean_is_exclusive(x_31);
if (x_86 == 0)
{
return x_31;
}
else
{
lean_object* x_87; lean_object* x_88; 
x_87 = lean_ctor_get(x_31, 0);
lean_inc(x_87);
lean_dec(x_31);
x_88 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_88, 0, x_87);
return x_88;
}
}
block_11:
{
lean_object* x_9; lean_object* x_10; 
x_9 = lean_st_ref_get(x_6);
lean_dec(x_6);
lean_dec(x_9);
x_10 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_10, 0, x_7);
return x_10;
}
block_24:
{
lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; 
x_15 = lean_st_ref_get(x_12);
x_16 = lean_ctor_get(x_15, 0);
lean_inc_ref(x_16);
lean_dec(x_15);
x_17 = lean_ctor_get(x_16, 0);
lean_inc_ref(x_17);
lean_dec_ref(x_16);
x_18 = lean_ctor_get(x_17, 0);
lean_inc_ref(x_18);
lean_dec_ref(x_17);
lean_inc(x_13);
x_19 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initAndRunWorker_writeErrorDiag(x_2, x_18, x_13);
if (lean_obj_tag(x_19) == 0)
{
uint8_t x_20; 
lean_dec(x_12);
x_20 = !lean_is_exclusive(x_19);
if (x_20 == 0)
{
lean_object* x_21; 
x_21 = lean_ctor_get(x_19, 0);
lean_dec(x_21);
lean_ctor_set_tag(x_19, 1);
lean_ctor_set(x_19, 0, x_13);
return x_19;
}
else
{
lean_object* x_22; 
lean_dec(x_19);
x_22 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_22, 0, x_13);
return x_22;
}
}
else
{
lean_dec(x_13);
if (lean_obj_tag(x_19) == 0)
{
lean_object* x_23; 
x_23 = lean_ctor_get(x_19, 0);
lean_inc(x_23);
lean_dec_ref(x_19);
x_6 = x_12;
x_7 = x_23;
x_8 = lean_box(0);
goto block_11;
}
else
{
lean_dec(x_12);
return x_19;
}
}
}
block_29:
{
if (lean_obj_tag(x_26) == 0)
{
lean_object* x_27; 
lean_dec_ref(x_2);
x_27 = lean_ctor_get(x_26, 0);
lean_inc(x_27);
lean_dec_ref(x_26);
x_6 = x_25;
x_7 = x_27;
x_8 = lean_box(0);
goto block_11;
}
else
{
lean_object* x_28; 
x_28 = lean_ctor_get(x_26, 0);
lean_inc(x_28);
lean_dec_ref(x_26);
x_12 = x_25;
x_13 = x_28;
x_14 = lean_box(0);
goto block_24;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initAndRunWorker_spec__14___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
size_t x_9; size_t x_10; lean_object* x_11; 
x_9 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_10 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_11 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initAndRunWorker_spec__14(x_1, x_2, x_9, x_10, x_5, x_6, x_7);
lean_dec(x_7);
lean_dec_ref(x_6);
lean_dec_ref(x_2);
return x_11;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__1___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__1(x_1, x_2);
lean_dec_ref(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__2___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__2(x_1, x_2);
lean_dec_ref(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__3___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__3(x_1, x_2);
lean_dec_ref(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__4___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__4(x_1, x_2);
lean_dec_ref(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__5___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__5(x_1, x_2);
lean_dec_ref(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__6___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__6(x_1, x_2);
lean_dec_ref(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initAndRunWorker_spec__14___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
size_t x_7; size_t x_8; lean_object* x_9; 
x_7 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_8 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_9 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_initAndRunWorker_spec__14___redArg(x_1, x_2, x_7, x_8, x_5);
lean_dec_ref(x_2);
return x_9;
}
}
LEAN_EXPORT lean_object* l_IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12(x_1, x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0(x_1, x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_fromJson_x3f___at___00Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__6_spec__6_spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
size_t x_4; size_t x_5; lean_object* x_6; 
x_4 = lean_unbox_usize(x_1);
lean_dec(x_1);
x_5 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_6 = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Array_fromJson_x3f___at___00Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__6_spec__6_spec__6(x_4, x_5, x_3);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9(x_1, x_2);
lean_dec_ref(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_initAndRunWorker___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_Server_FileWorker_initAndRunWorker(x_1, x_2, x_3, x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12(x_1, x_2, x_3);
lean_dec(x_2);
return x_5;
}
}
LEAN_EXPORT lean_object* l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0(x_1, x_2, x_3);
lean_dec(x_2);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_workerMain(lean_object* x_1) {
_start:
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6; lean_object* x_7; lean_object* x_8; uint32_t x_14; lean_object* x_15; lean_object* x_23; lean_object* x_24; lean_object* x_33; 
x_3 = lean_get_stdin();
x_4 = lean_get_stdout();
x_5 = lean_get_stderr();
x_6 = 1;
lean_inc_ref(x_5);
x_33 = l_Lean_Server_FileWorker_initAndRunWorker(x_3, x_4, x_5, x_1);
if (lean_obj_tag(x_33) == 0)
{
uint8_t x_34; lean_object* x_35; 
lean_dec_ref(x_33);
x_34 = 0;
x_35 = lean_io_force_exit(x_34);
if (lean_obj_tag(x_35) == 0)
{
lean_object* x_36; uint32_t x_37; 
lean_dec_ref(x_5);
x_36 = lean_ctor_get(x_35, 0);
lean_inc(x_36);
lean_dec_ref(x_35);
x_37 = lean_unbox_uint32(x_36);
lean_dec(x_36);
x_14 = x_37;
x_15 = lean_box(0);
goto block_22;
}
else
{
lean_object* x_38; 
x_38 = lean_ctor_get(x_35, 0);
lean_inc(x_38);
lean_dec_ref(x_35);
x_23 = x_38;
x_24 = lean_box(0);
goto block_32;
}
}
else
{
lean_object* x_39; 
x_39 = lean_ctor_get(x_33, 0);
lean_inc(x_39);
lean_dec_ref(x_33);
x_23 = x_39;
x_24 = lean_box(0);
goto block_32;
}
block_13:
{
lean_object* x_9; 
x_9 = lean_io_force_exit(x_6);
if (lean_obj_tag(x_9) == 0)
{
uint8_t x_10; 
x_10 = !lean_is_exclusive(x_9);
if (x_10 == 0)
{
lean_object* x_11; 
x_11 = lean_ctor_get(x_9, 0);
lean_dec(x_11);
lean_ctor_set_tag(x_9, 1);
lean_ctor_set(x_9, 0, x_7);
return x_9;
}
else
{
lean_object* x_12; 
lean_dec(x_9);
x_12 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_12, 0, x_7);
return x_12;
}
}
else
{
lean_dec(x_7);
return x_9;
}
}
block_22:
{
lean_object* x_16; 
x_16 = lean_io_force_exit(x_6);
if (lean_obj_tag(x_16) == 0)
{
uint8_t x_17; 
x_17 = !lean_is_exclusive(x_16);
if (x_17 == 0)
{
lean_object* x_18; lean_object* x_19; 
x_18 = lean_ctor_get(x_16, 0);
lean_dec(x_18);
x_19 = lean_box_uint32(x_14);
lean_ctor_set(x_16, 0, x_19);
return x_16;
}
else
{
lean_object* x_20; lean_object* x_21; 
lean_dec(x_16);
x_20 = lean_box_uint32(x_14);
x_21 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_21, 0, x_20);
return x_21;
}
}
else
{
return x_16;
}
}
block_32:
{
lean_object* x_25; lean_object* x_26; 
x_25 = lean_io_error_to_string(x_23);
x_26 = l_IO_FS_Stream_putStrLn(x_5, x_25);
if (lean_obj_tag(x_26) == 0)
{
lean_object* x_27; 
lean_dec_ref(x_26);
x_27 = lean_io_force_exit(x_6);
if (lean_obj_tag(x_27) == 0)
{
lean_object* x_28; uint32_t x_29; 
x_28 = lean_ctor_get(x_27, 0);
lean_inc(x_28);
lean_dec_ref(x_27);
x_29 = lean_unbox_uint32(x_28);
lean_dec(x_28);
x_14 = x_29;
x_15 = lean_box(0);
goto block_22;
}
else
{
lean_object* x_30; 
x_30 = lean_ctor_get(x_27, 0);
lean_inc(x_30);
lean_dec_ref(x_27);
x_7 = x_30;
x_8 = lean_box(0);
goto block_13;
}
}
else
{
lean_object* x_31; 
x_31 = lean_ctor_get(x_26, 0);
lean_inc(x_31);
lean_dec_ref(x_26);
x_7 = x_31;
x_8 = lean_box(0);
goto block_13;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Server_FileWorker_workerMain___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lean_Server_FileWorker_workerMain(x_1);
return x_3;
}
}
lean_object* initialize_Std_Sync_Channel(uint8_t builtin);
lean_object* initialize_Lean_Language_Lean(uint8_t builtin);
lean_object* initialize_Lean_Server_FileWorker_Utils(uint8_t builtin);
lean_object* initialize_Lean_Server_FileWorker_RequestHandling(uint8_t builtin);
lean_object* initialize_Lean_Server_FileWorker_WidgetRequests(uint8_t builtin);
lean_object* initialize_Lean_Server_FileWorker_SetupFile(uint8_t builtin);
lean_object* initialize_Lean_Server_Completion_ImportCompletion(uint8_t builtin);
lean_object* initialize_Lean_Server_CodeActions_UnknownIdentifier(uint8_t builtin);
static bool _G_initialized = false;
LEAN_EXPORT lean_object* initialize_Lean_Server_FileWorker(uint8_t builtin) {
lean_object * res;
if (_G_initialized) return lean_io_result_mk_ok(lean_box(0));
_G_initialized = true;
res = initialize_Std_Sync_Channel(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lean_Language_Lean(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lean_Server_FileWorker_Utils(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lean_Server_FileWorker_RequestHandling(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lean_Server_FileWorker_WidgetRequests(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lean_Server_FileWorker_SetupFile(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lean_Server_Completion_ImportCompletion(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lean_Server_CodeActions_UnknownIdentifier(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default___closed__0 = _init_l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default___closed__0);
l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default___closed__1 = _init_l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default___closed__1();
lean_mark_persistent(l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default___closed__1);
l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default = _init_l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default();
lean_mark_persistent(l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo_default);
l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo = _init_l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo();
lean_mark_persistent(l_Lean_Server_FileWorker_instInhabitedPartialHandlerInfo);
l_Lean_Server_FileWorker_instInhabitedOutputMessage_default___closed__0 = _init_l_Lean_Server_FileWorker_instInhabitedOutputMessage_default___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_instInhabitedOutputMessage_default___closed__0);
l_Lean_Server_FileWorker_instInhabitedOutputMessage_default = _init_l_Lean_Server_FileWorker_instInhabitedOutputMessage_default();
lean_mark_persistent(l_Lean_Server_FileWorker_instInhabitedOutputMessage_default);
l_Lean_Server_FileWorker_instInhabitedOutputMessage = _init_l_Lean_Server_FileWorker_instInhabitedOutputMessage();
lean_mark_persistent(l_Lean_Server_FileWorker_instInhabitedOutputMessage);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__0 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__0);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__1 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__1();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__1);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__2 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__2();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__2);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__3 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__3();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__3);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__4 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__4();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__4);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__5 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__5();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__5);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__6 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__6();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__6);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__7 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__7();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__7);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__8 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__8();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__8);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__9 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__9();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__9);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__10 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__10();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__10);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__11 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__11();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__11);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__12 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__12();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__12);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__13 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__13();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__13);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__14 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__14();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__14);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__15 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__15();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__15);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__16 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__16();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__16);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__17 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__17();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__17);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__18 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__18();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__18);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__19 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__19();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__19);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__20 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__20();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__20);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__21 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__21();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__21);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__22 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__22();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__22);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__23 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__23();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__23);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__24 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__24();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__24);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__25 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__25();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__25);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__26 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__26();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__26);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__27 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__27();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__27);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__28 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__28();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__28);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__29 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__29();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__29);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__30 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__30();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__30);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__31 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__31();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__31);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__32 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__32();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__32);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__33 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__33();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__33);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__34 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__34();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__34);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__35 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__35();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__35);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__36 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__36();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__36);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__37 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__37();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__37);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__38 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__38();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__38);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__39 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__39();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__39);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__40 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__40();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__40);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__41 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__41();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__41);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__42 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__42();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__42);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__43 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__43();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__43);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__44 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__44();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__44);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__45 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__45();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__45);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__46 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__46();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__46);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__47 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__47();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__47);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__48 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__48();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__48);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__49 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__49();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__49);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__50 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__50();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__50);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__51 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__51();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__51);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__52 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__52();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__52);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__53 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__53();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__53);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__54 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__54();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__54);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__55 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__55();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__55);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__56 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__56();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__56);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__57 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__57();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__57);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__58 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__58();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__58);
l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__59 = _init_l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__59();
lean_mark_persistent(l_Lean_Server_FileWorker_OutputMessage_ofMsg___closed__59);
l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__2 = _init_l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__2();
lean_mark_persistent(l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__2);
l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__1 = _init_l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__1();
lean_mark_persistent(l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__1);
l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__0 = _init_l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__0();
lean_mark_persistent(l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__0);
l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__3 = _init_l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__3();
lean_mark_persistent(l_Std_DTreeMap_Internal_Impl_Const_get_x21___at___00Lean_Server_FileWorker_WorkerContext_modifyGetPartialHandler_spec__0___redArg___closed__3);
l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___redArg___closed__0 = _init_l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___redArg___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___redArg___closed__0);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderInfoNotification___closed__0 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderInfoNotification___closed__0();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderInfoNotification___closed__0);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderSetupInfoNotification___closed__0 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderSetupInfoNotification___closed__0();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanHeaderSetupInfoNotification___closed__0);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoUpdateNotification___closed__0 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoUpdateNotification___closed__0();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoUpdateNotification___closed__0);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoFinalNotification___closed__0 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoFinalNotification___closed__0();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkIleanInfoFinalNotification___closed__0);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkImportClosureNotification___closed__0 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkImportClosureNotification___closed__0();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_mkImportClosureNotification___closed__0);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default___closed__0 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default___closed__0();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default___closed__0);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default___closed__1 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default___closed__1();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default___closed__1);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState_default);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_instInhabitedReportSnapshotsState);
l_Lean_Server_FileWorker_initFn___closed__0_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_ = _init_l_Lean_Server_FileWorker_initFn___closed__0_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_();
lean_mark_persistent(l_Lean_Server_FileWorker_initFn___closed__0_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_);
l_Lean_Server_FileWorker_initFn___closed__1_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_ = _init_l_Lean_Server_FileWorker_initFn___closed__1_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_();
lean_mark_persistent(l_Lean_Server_FileWorker_initFn___closed__1_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_);
l_Lean_Server_FileWorker_initFn___closed__2_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_ = _init_l_Lean_Server_FileWorker_initFn___closed__2_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_();
lean_mark_persistent(l_Lean_Server_FileWorker_initFn___closed__2_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_);
l_Lean_Server_FileWorker_initFn___closed__3_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_ = _init_l_Lean_Server_FileWorker_initFn___closed__3_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_();
lean_mark_persistent(l_Lean_Server_FileWorker_initFn___closed__3_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_);
l_Lean_Server_FileWorker_initFn___closed__4_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_ = _init_l_Lean_Server_FileWorker_initFn___closed__4_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_();
lean_mark_persistent(l_Lean_Server_FileWorker_initFn___closed__4_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_);
l_Lean_Server_FileWorker_initFn___closed__5_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_ = _init_l_Lean_Server_FileWorker_initFn___closed__5_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_();
lean_mark_persistent(l_Lean_Server_FileWorker_initFn___closed__5_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_);
l_Lean_Server_FileWorker_initFn___closed__6_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_ = _init_l_Lean_Server_FileWorker_initFn___closed__6_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_();
lean_mark_persistent(l_Lean_Server_FileWorker_initFn___closed__6_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_);
l_Lean_Server_FileWorker_initFn___closed__7_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_ = _init_l_Lean_Server_FileWorker_initFn___closed__7_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_();
lean_mark_persistent(l_Lean_Server_FileWorker_initFn___closed__7_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_);
l_Lean_Server_FileWorker_initFn___closed__8_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_ = _init_l_Lean_Server_FileWorker_initFn___closed__8_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_();
lean_mark_persistent(l_Lean_Server_FileWorker_initFn___closed__8_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_);
if (builtin) {res = l_Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_3591085687____hygCtx___hyg_4_();
if (lean_io_result_is_error(res)) return res;
l_Lean_Server_FileWorker_server_reportDelayMs = lean_io_result_get_value(res);
lean_mark_persistent(l_Lean_Server_FileWorker_server_reportDelayMs);
lean_dec_ref(res);
}l_Lean_Server_FileWorker_instImpl___closed__0_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_ = _init_l_Lean_Server_FileWorker_instImpl___closed__0_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_();
lean_mark_persistent(l_Lean_Server_FileWorker_instImpl___closed__0_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_);
l_Lean_Server_FileWorker_instImpl___closed__1_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_ = _init_l_Lean_Server_FileWorker_instImpl___closed__1_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_();
lean_mark_persistent(l_Lean_Server_FileWorker_instImpl___closed__1_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_);
l_Lean_Server_FileWorker_instImpl_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_ = _init_l_Lean_Server_FileWorker_instImpl_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_();
lean_mark_persistent(l_Lean_Server_FileWorker_instImpl_00___x40_Lean_Server_FileWorker_3439114125____hygCtx___hyg_15_);
l_Lean_Server_FileWorker_instTypeNameMemorizedInteractiveDiagnostics = _init_l_Lean_Server_FileWorker_instTypeNameMemorizedInteractiveDiagnostics();
lean_mark_persistent(l_Lean_Server_FileWorker_instTypeNameMemorizedInteractiveDiagnostics);
l_Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3___closed__0 = _init_l_Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3___closed__0();
lean_mark_persistent(l_Array_filterMapM___at___00__private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_sendFileProgress_spec__3___closed__0);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode___closed__0 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode___closed__0();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode___closed__0);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode___closed__1 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode___closed__1();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleNode___closed__1);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___closed__0 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___closed__0();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___closed__0);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___closed__1 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___closed__1();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots_handleFinished___closed__1);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__0___closed__0 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__0___closed__0();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__0___closed__0);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__1___closed__0 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__1___closed__0();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__1___closed__0);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__3___closed__0 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__3___closed__0();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___lam__3___closed__0);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___closed__0 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___closed__0();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_reportSnapshots___closed__0);
if (builtin) {res = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initFn_00___x40_Lean_Server_FileWorker_1535841126____hygCtx___hyg_2_();
if (lean_io_result_is_error(res)) return res;
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_importsLoadedRef = lean_io_result_get_value(res);
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_importsLoadedRef);
lean_dec_ref(res);
}l_Lean_Server_FileWorker_setupImports___lam__0___closed__0 = _init_l_Lean_Server_FileWorker_setupImports___lam__0___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___lam__0___closed__0);
l_Lean_Server_FileWorker_setupImports___lam__0___closed__1 = _init_l_Lean_Server_FileWorker_setupImports___lam__0___closed__1();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___lam__0___closed__1);
l_Lean_Server_FileWorker_setupImports___lam__0___closed__2 = _init_l_Lean_Server_FileWorker_setupImports___lam__0___closed__2();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___lam__0___closed__2);
l_Lean_Server_FileWorker_setupImports___lam__0___closed__3 = _init_l_Lean_Server_FileWorker_setupImports___lam__0___closed__3();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___lam__0___closed__3);
l_Lean_Server_FileWorker_setupImports___lam__0___closed__4 = _init_l_Lean_Server_FileWorker_setupImports___lam__0___closed__4();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___lam__0___closed__4);
l_Lean_Server_FileWorker_setupImports___closed__0 = _init_l_Lean_Server_FileWorker_setupImports___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___closed__0);
l_Lean_Server_FileWorker_setupImports___closed__1 = _init_l_Lean_Server_FileWorker_setupImports___closed__1();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___closed__1);
l_Lean_Server_FileWorker_setupImports___closed__2 = _init_l_Lean_Server_FileWorker_setupImports___closed__2();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___closed__2);
l_Lean_Server_FileWorker_setupImports___closed__3 = _init_l_Lean_Server_FileWorker_setupImports___closed__3();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___closed__3);
l_Lean_Server_FileWorker_setupImports___closed__4 = _init_l_Lean_Server_FileWorker_setupImports___closed__4();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___closed__4);
l_Lean_Server_FileWorker_setupImports___closed__5 = _init_l_Lean_Server_FileWorker_setupImports___closed__5();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___closed__5);
l_Lean_Server_FileWorker_setupImports___closed__6 = _init_l_Lean_Server_FileWorker_setupImports___closed__6();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___closed__6);
l_Lean_Server_FileWorker_setupImports___closed__7 = _init_l_Lean_Server_FileWorker_setupImports___closed__7();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___closed__7);
l_Lean_Server_FileWorker_setupImports___closed__8 = _init_l_Lean_Server_FileWorker_setupImports___closed__8();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___closed__8);
l_Lean_Server_FileWorker_setupImports___closed__9 = _init_l_Lean_Server_FileWorker_setupImports___closed__9();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___closed__9);
l_Lean_Server_FileWorker_setupImports___closed__10 = _init_l_Lean_Server_FileWorker_setupImports___closed__10();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___closed__10);
l_Lean_Server_FileWorker_setupImports___closed__11 = _init_l_Lean_Server_FileWorker_setupImports___closed__11();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___closed__11);
l_Lean_Server_FileWorker_setupImports___closed__12 = _init_l_Lean_Server_FileWorker_setupImports___closed__12();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___closed__12);
l_Lean_Server_FileWorker_setupImports___closed__13 = _init_l_Lean_Server_FileWorker_setupImports___closed__13();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___closed__13);
l_Lean_Server_FileWorker_setupImports___closed__14 = _init_l_Lean_Server_FileWorker_setupImports___closed__14();
lean_mark_persistent(l_Lean_Server_FileWorker_setupImports___closed__14);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1___closed__0 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1___closed__0();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1___closed__0);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1___closed__1 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1___closed__1();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_mkLspOutputChannel___lam__1___closed__1);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_getImportClosure_x3f___closed__0 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_getImportClosure_x3f___closed__0();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initializeWorker_getImportClosure_x3f___closed__0);
l_Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2___closed__0 = _init_l_Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2___closed__0();
lean_mark_persistent(l_Array_filterMapM___at___00Lean_Server_FileWorker_initializeWorker_spec__2___closed__0);
l_Lean_Server_FileWorker_initializeWorker___closed__0 = _init_l_Lean_Server_FileWorker_initializeWorker___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_initializeWorker___closed__0);
l_Lean_Server_FileWorker_initializeWorker___closed__1 = _init_l_Lean_Server_FileWorker_initializeWorker___closed__1();
lean_mark_persistent(l_Lean_Server_FileWorker_initializeWorker___closed__1);
l_Lean_Server_FileWorker_sendServerRequest___redArg___closed__0 = _init_l_Lean_Server_FileWorker_sendServerRequest___redArg___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_sendServerRequest___redArg___closed__0);
l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__0 = _init_l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__0);
l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__1 = _init_l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__1();
lean_mark_persistent(l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__1);
l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__2 = _init_l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__2();
lean_mark_persistent(l_Lean_Server_FileWorker_handleStaleDependency___redArg___closed__2);
l_Lean_Server_FileWorker_parseParams___redArg___closed__0 = _init_l_Lean_Server_FileWorker_parseParams___redArg___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_parseParams___redArg___closed__0);
l_Lean_Server_FileWorker_parseParams___redArg___closed__1 = _init_l_Lean_Server_FileWorker_parseParams___redArg___closed__1();
lean_mark_persistent(l_Lean_Server_FileWorker_parseParams___redArg___closed__1);
l_Lean_Server_FileWorker_handleNotification___closed__0 = _init_l_Lean_Server_FileWorker_handleNotification___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__0);
l_Lean_Server_FileWorker_handleNotification___closed__1 = _init_l_Lean_Server_FileWorker_handleNotification___closed__1();
lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__1);
l_Lean_Server_FileWorker_handleNotification___closed__2 = _init_l_Lean_Server_FileWorker_handleNotification___closed__2();
lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__2);
l_Lean_Server_FileWorker_handleNotification___closed__3 = _init_l_Lean_Server_FileWorker_handleNotification___closed__3();
lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__3);
l_Lean_Server_FileWorker_handleNotification___closed__4 = _init_l_Lean_Server_FileWorker_handleNotification___closed__4();
lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__4);
l_Lean_Server_FileWorker_handleNotification___closed__5 = _init_l_Lean_Server_FileWorker_handleNotification___closed__5();
lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__5);
l_Lean_Server_FileWorker_handleNotification___closed__6 = _init_l_Lean_Server_FileWorker_handleNotification___closed__6();
lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__6);
l_Lean_Server_FileWorker_handleNotification___closed__7 = _init_l_Lean_Server_FileWorker_handleNotification___closed__7();
lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__7);
l_Lean_Server_FileWorker_handleNotification___closed__8 = _init_l_Lean_Server_FileWorker_handleNotification___closed__8();
lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__8);
l_Lean_Server_FileWorker_handleNotification___closed__9 = _init_l_Lean_Server_FileWorker_handleNotification___closed__9();
lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__9);
l_Lean_Server_FileWorker_handleNotification___closed__10 = _init_l_Lean_Server_FileWorker_handleNotification___closed__10();
lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__10);
l_Lean_Server_FileWorker_handleNotification___closed__11 = _init_l_Lean_Server_FileWorker_handleNotification___closed__11();
lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__11);
l_Lean_Server_FileWorker_handleNotification___closed__12 = _init_l_Lean_Server_FileWorker_handleNotification___closed__12();
lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__12);
l_Lean_Server_FileWorker_handleNotification___closed__13 = _init_l_Lean_Server_FileWorker_handleNotification___closed__13();
lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__13);
l_Lean_Server_FileWorker_handleNotification___closed__14 = _init_l_Lean_Server_FileWorker_handleNotification___closed__14();
lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__14);
l_Lean_Server_FileWorker_handleNotification___closed__15 = _init_l_Lean_Server_FileWorker_handleNotification___closed__15();
lean_mark_persistent(l_Lean_Server_FileWorker_handleNotification___closed__15);
l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases___closed__0 = _init_l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases___closed__0);
l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases___closed__1 = _init_l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases___closed__1();
lean_mark_persistent(l_Lean_Server_FileWorker_handleStatefulPreRequestSpecialCases___closed__1);
l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0_spec__0___closed__0 = _init_l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0_spec__0___closed__0();
lean_mark_persistent(l_Lean_Server_parseRequestParams___at___00Lean_Server_RequestM_parseRequestParams___at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__0_spec__0___closed__0);
l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__0 = _init_l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__0();
lean_mark_persistent(l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__0);
l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__1 = _init_l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__1();
lean_mark_persistent(l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__1);
l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__2 = _init_l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__2();
lean_mark_persistent(l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__2);
l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__3 = _init_l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__3();
lean_mark_persistent(l_Lean_Widget_instToJsonTaggedText_toJson___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__10___closed__3);
l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__0 = _init_l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__0();
lean_mark_persistent(l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__0);
l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__1 = _init_l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__1();
lean_mark_persistent(l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__1);
l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__2 = _init_l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__2();
lean_mark_persistent(l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__2);
l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__3 = _init_l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__3();
lean_mark_persistent(l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8_spec__16___closed__3);
l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__0 = _init_l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__0();
lean_mark_persistent(l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__0);
l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__1 = _init_l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__1();
lean_mark_persistent(l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__1);
l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__2 = _init_l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__2();
lean_mark_persistent(l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__2);
l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__3 = _init_l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__3();
lean_mark_persistent(l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__3);
l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__4 = _init_l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__4();
lean_mark_persistent(l_Lean_Widget_instRpcEncodableDiagnosticWith_enc_00___x40_Lean_Widget_InteractiveDiagnostic_2989700264____hygCtx___hyg_2____at___00Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f_spec__8___closed__4);
l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__0 = _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__0);
l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__1 = _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__1();
lean_mark_persistent(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__1);
l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__2 = _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__2();
lean_mark_persistent(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__2);
l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__3 = _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__3();
lean_mark_persistent(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__3);
l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__4 = _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__4();
lean_mark_persistent(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__4);
l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__5 = _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__5();
lean_mark_persistent(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__5);
l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__6 = _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__6();
lean_mark_persistent(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__6);
l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__7 = _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__7();
lean_mark_persistent(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__7);
l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__8 = _init_l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__8();
lean_mark_persistent(l_Lean_Server_FileWorker_handlePreRequestSpecialCases_x3f___closed__8);
l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__0 = _init_l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__0();
lean_mark_persistent(l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__0);
l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__1 = _init_l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__1();
lean_mark_persistent(l_Array_fromJson_x3f___at___00Lean_Server_FileWorker_handlePostRequestSpecialCases_spec__0___closed__1);
l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__0 = _init_l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__0);
l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__1 = _init_l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__1();
lean_mark_persistent(l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__1);
l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__2 = _init_l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__2();
lean_mark_persistent(l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__2);
l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__3 = _init_l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__3();
lean_mark_persistent(l_Lean_Server_FileWorker_handlePostRequestSpecialCases___lam__0___closed__3);
l_Lean_Server_FileWorker_handlePostRequestSpecialCases___closed__0 = _init_l_Lean_Server_FileWorker_handlePostRequestSpecialCases___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_handlePostRequestSpecialCases___closed__0);
l_Lean_Server_FileWorker_emitRequestResponse___redArg___closed__0 = _init_l_Lean_Server_FileWorker_emitRequestResponse___redArg___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_emitRequestResponse___redArg___closed__0);
l_Lean_Server_FileWorker_emitRequestResponse___redArg___closed__1 = _init_l_Lean_Server_FileWorker_emitRequestResponse___redArg___closed__1();
lean_mark_persistent(l_Lean_Server_FileWorker_emitRequestResponse___redArg___closed__1);
l_Lean_Server_FileWorker_emitRequestResponse___redArg___lam__0___closed__0 = _init_l_Lean_Server_FileWorker_emitRequestResponse___redArg___lam__0___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_emitRequestResponse___redArg___lam__0___closed__0);
l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__0 = _init_l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__0();
lean_mark_persistent(l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__0);
l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__1 = _init_l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__1();
lean_mark_persistent(l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__1);
l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__2 = _init_l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__2();
lean_mark_persistent(l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__2);
l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__3 = _init_l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__3();
lean_mark_persistent(l_Std_DTreeMap_Internal_Impl_foldlM___at___00Lean_Server_FileWorker_mainLoop_spec__1___redArg___closed__3);
l_Lean_Server_FileWorker_mainLoop___closed__0 = _init_l_Lean_Server_FileWorker_mainLoop___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_mainLoop___closed__0);
l_Lean_Server_FileWorker_mainLoop___closed__1 = _init_l_Lean_Server_FileWorker_mainLoop___closed__1();
lean_mark_persistent(l_Lean_Server_FileWorker_mainLoop___closed__1);
l_Option_fromJson_x3f___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0_spec__0___closed__0 = _init_l_Option_fromJson_x3f___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0_spec__0___closed__0();
lean_mark_persistent(l_Option_fromJson_x3f___at___00Lean_Server_FileWorker_WorkerContext_initPendingServerRequest___at___00Lean_Server_FileWorker_sendServerRequest___at___00Lean_Server_FileWorker_runRefreshTasks_spec__0_spec__0_spec__0___closed__0);
l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg___closed__0 = _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg___closed__0();
lean_mark_persistent(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Server_FileWorker_runRefreshTasks_spec__6___redArg___closed__0);
l_Lean_Server_FileWorker_runRefreshTasks___closed__0 = _init_l_Lean_Server_FileWorker_runRefreshTasks___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_runRefreshTasks___closed__0);
l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initAndRunWorker_writeErrorDiag___closed__0 = _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initAndRunWorker_writeErrorDiag___closed__0();
lean_mark_persistent(l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_initAndRunWorker_writeErrorDiag___closed__0);
l_IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12___closed__0 = _init_l_IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12___closed__0();
lean_mark_persistent(l_IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12___closed__0);
l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__0 = _init_l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__0();
lean_mark_persistent(l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__0);
l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__1 = _init_l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__1();
lean_mark_persistent(l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__1);
l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__2 = _init_l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__2();
lean_mark_persistent(l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__2);
l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__3 = _init_l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__3();
lean_mark_persistent(l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__3);
l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__4 = _init_l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__4();
lean_mark_persistent(l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__4);
l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__5 = _init_l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__5();
lean_mark_persistent(l_IO_FS_Stream_readNotificationAs___at___00IO_FS_Stream_readLspNotificationAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__12_spec__12___closed__5);
l_IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0___closed__0 = _init_l_IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0___closed__0();
lean_mark_persistent(l_IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0___closed__0);
l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__0 = _init_l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__0();
lean_mark_persistent(l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__0);
l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__1 = _init_l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__1();
lean_mark_persistent(l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__1);
l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__2 = _init_l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__2();
lean_mark_persistent(l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__2);
l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__3 = _init_l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__3();
lean_mark_persistent(l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__3);
l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__4 = _init_l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__4();
lean_mark_persistent(l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__4);
l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__5 = _init_l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__5();
lean_mark_persistent(l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__5);
l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__6 = _init_l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__6();
lean_mark_persistent(l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__6);
l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__0 = _init_l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__0();
lean_mark_persistent(l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__0);
l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__1 = _init_l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__1();
lean_mark_persistent(l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__1);
l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__2 = _init_l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__2();
lean_mark_persistent(l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__2);
l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__3 = _init_l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__3();
lean_mark_persistent(l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__3);
l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__4 = _init_l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__4();
lean_mark_persistent(l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__4);
l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__5 = _init_l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__5();
lean_mark_persistent(l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__5);
l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__6 = _init_l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__6();
lean_mark_persistent(l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__6);
l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__7 = _init_l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__7();
lean_mark_persistent(l_Lean_Json_getObjValAs_x3f___at___00IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0_spec__9___closed__7);
l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__7 = _init_l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__7();
lean_mark_persistent(l_IO_FS_Stream_readRequestAs___at___00IO_FS_Stream_readLspRequestAs___at___00Lean_Server_FileWorker_initAndRunWorker_spec__0_spec__0___closed__7);
l_Lean_Server_FileWorker_initAndRunWorker___closed__0 = _init_l_Lean_Server_FileWorker_initAndRunWorker___closed__0();
lean_mark_persistent(l_Lean_Server_FileWorker_initAndRunWorker___closed__0);
l_Lean_Server_FileWorker_initAndRunWorker___closed__1 = _init_l_Lean_Server_FileWorker_initAndRunWorker___closed__1();
lean_mark_persistent(l_Lean_Server_FileWorker_initAndRunWorker___closed__1);
l_Lean_Server_FileWorker_initAndRunWorker___closed__2 = _init_l_Lean_Server_FileWorker_initAndRunWorker___closed__2();
lean_mark_persistent(l_Lean_Server_FileWorker_initAndRunWorker___closed__2);
l_Lean_Server_FileWorker_initAndRunWorker___closed__3 = _init_l_Lean_Server_FileWorker_initAndRunWorker___closed__3();
lean_mark_persistent(l_Lean_Server_FileWorker_initAndRunWorker___closed__3);
return lean_io_result_mk_ok(lean_box(0));
}
#ifdef __cplusplus
}
#endif
